什么时候GridView1_SelectedIndexChanged会引发事件 [英] When will GridView1_SelectedIndexChanged Event raise

查看:81
本文介绍了什么时候GridView1_SelectedIndexChanged会引发事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want to know.. When will GridView1_SelectedIndexChanged Event raise...

and also how " GridView1.SelectedDataKey " will capture the value... please help me

Thanks, Bajid

推荐答案

请参阅: GridView事件 [ ^ ]



并获取SelectedDataKey使用此: Your_GridView.SelectedDataKey.Value。 ToString()


单击行的选择按钮但在GridView控件处理选择操作后发生。



参考MSDN: -



http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanged%28v=vs .110%29.aspx [ ^ ]
Occurs when a row's Select button is clicked, but after the GridView control handles the select operation.

Refer MSDN:-

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanged%28v=vs.110%29.aspx[^]


这将引发。当点击按钮选择时,

这个按钮可以通过edit-> commandfiled->添加。选择

或将Commandname =select分配给任何按钮
This will raise. When Button having select command will be clicked so.
This button you can add by edit->commandfiled-> select
or by assiging Commandname="select" to any button


这篇关于什么时候GridView1_SelectedIndexChanged会引发事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆