Asp.Net datagrid row selected event
In asp.net App I am using datagrid.Is there any event fired when a row is selected?I am not using any select button in开发者_开发知识库 grid.
what about : SelectedIndexChanged
"Occurs when a different item is selected in a data listing control between posts to the server"
SelectedIndexChanged event will fired when you click on Select Command.
You can use a CommandField or a templateField to implement a Select. if you are using a command field enable SelectCommand and assign somthing to Select Text. And if you are using a template filed put a LinkButton on it and Assign Select toCommand property like this
<asp:LinkButton ID="lnbSelect" runat="server" CommandName="Select" />
You can also use any link button with any command and subscribe to the RowCommand event.
精彩评论