We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

get selected row

Thread ID:

Created:

Updated:

Platform:

Replies:

123815 Apr 24,2016 05:06 AM Apr 25,2016 04:49 AM ASP.NET Web Forms 1
loading
Tags: Grid
Aladdin
Asked On April 24, 2016 05:06 AM

how to get selected row from ej grid
i want it in my cs code as an object ??

Jayaprakash Kamaraj [Syncfusion]
Replied On April 25, 2016 04:49 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;