Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
I want to know.. When will GridView1_SelectedIndexChanged Event raise...

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

Thanks, Bajid
Posted

See this : GridView Events[^]

and to get SelectedDataKey use this : Your_GridView.SelectedDataKey.Value.ToString()
 
Share this answer
 
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[^]
 
Share this answer
 
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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900