FineUI 官方论坛

标题: grid行的选中问题(checkbox) [打印本页]

作者: _-。sorry!    时间: 2013-4-7 14:36
标题: grid行的选中问题(checkbox)
请问怎么在grid绑定的时候选中需要选中的行呢,比如分页第一页我要选中1,3,5行,第二页显示2,4,6行,有没有数据行都绑定完触发的事件

作者: appletreegd    时间: 2013-4-8 03:40
this.Grid1.DataSource = list;
this.Grid1.DataBind();
this.Grid1.SelectedRowIndexArray = new int[] { 0, 2, 4 };//选中1,3,5行

分页你要选中的话就在Grid1_PageIndexChange(object sender, FineUI.GridPageEventArgs e)里做文章吧

单行数据绑定完事件是OnRowDataBound,你可以试试




欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/) Powered by Discuz! X3.4