Hi Aladdin,
Thank you for contacting Syncfusion support.
We were able to get selected row in server using OnServerRowSelected server event. This event triggers when any of rows are selected in Grid. Please refer to the below code example, screenshot, Help document and sample.
GridFeatures.aspx
<ej:Grid ID="Grid1" runat="server" AllowPaging="True" OnServerRowSelected="DefaultEvents_OnServerRowSelected"
>
<Columns>
<ej:Column Field="OrderID" HeaderText="Order ID" TextAlign="Right" Width="90" />
<ej:Column Field="CustomerID" HeaderText="Customer ID" Width="100" />
<ej:Column Field="EmployeeID" HeaderText="Employee ID" TextAlign="Right" Width="110" />
<ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Width="90" Format="{0:C}" />
<ej:Column Field="ShipCity" HeaderText="Ship City" Width="100" />
</Columns>
</ej:Grid> </div> GridFeatures.aspx.cs
protected void DefaultEvents_OnServerRowSelected(object sender, GridEventArgs e)
{
for (int index = 0; index < e.Arguments.Count; index++)
{
var item = e.Arguments.ElementAt(index);
var itemKey = item.Key;
var itemValue = item.Value;
}
// do your operatios here } |
Regards,
Jayaprakash K.