asp.net repeater 中怎么获取checkbox 选中行的数据?
2个回答
2011-01-13
展开全部
在你的 Repeater1的ItemCommand时间里获得控件,取得数据
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
CheckBox ckbox=(CheckBox) e.Item.FindControl("checkbox");
}
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
CheckBox ckbox=(CheckBox) e.Item.FindControl("checkbox");
}
展开全部
<?xml version="1.0"?>
<mx:Application xmlns:mx="" fontSize="12" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
[Bindable]
private var dp:Array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
]]>
</mx:Script>
<mx:Panel title="Repeater Example" width="565" height="476"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10" horizontalCenter="4" verticalCenter="-14">
<mx:Repeater id="rp" dataProvider="">
<mx:HBox>
<mx:CheckBox label="" click="Alert.show(String(event.currentTarget.getRepeaterItem()) + ' pressed')"/>
<mx:Label text="邮件标题..."/>
</mx:HBox>
</mx:Repeater>
</mx:Panel>
</mx:Application>
<mx:Application xmlns:mx="" fontSize="12" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
[Bindable]
private var dp:Array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
]]>
</mx:Script>
<mx:Panel title="Repeater Example" width="565" height="476"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10" horizontalCenter="4" verticalCenter="-14">
<mx:Repeater id="rp" dataProvider="">
<mx:HBox>
<mx:CheckBox label="" click="Alert.show(String(event.currentTarget.getRepeaterItem()) + ' pressed')"/>
<mx:Label text="邮件标题..."/>
</mx:HBox>
</mx:Repeater>
</mx:Panel>
</mx:Application>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询