开发者

how to UnSelect all rows in GridView - asp.net?

how to UnSelect all rows in GridView - asp.net ?

if i select 开发者_Go百科one row in GridView and make any refresh, how to unselect this row ?

thanks


Looks like you can set the SelectedIndex to -1.

gridView1.SelectedIndex = -1;

Note: You will need to do this after each databind of new data to the GridView.


As SvDevMan81 noted, you'd set the GridView's SelectedIndex property to -1.

Similarly, if you have an editable grid and you want to revert the grid to its read-only mode you can set the GridView's EditIndex property to -1.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜