New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
SelectedIndexChanged Event
Fired when a different item is selected in a data listing control between posts to the server.
Event Parameters
-
(object)
sender- The control that fires the event
-
(EventArgs)
e- Does not contain arguments
Attaching the event
In the Markup
ASP.NET
<telerik:RadGrid ID="RadGrid1" runat="server" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>
In the Code behind
C#
protected void Page_Init(object sender, EventArgs e)
{
RadGrid1.SelectedIndexChanged += RadGrid1_SelectedIndexChanged;
}
The event handler
C#
protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
{
GridItem item = RadGrid1.SelectedItems[0];
}