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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Select row through javascript

Thread ID:





126062 Sep 21,2016 09:34 AM UTC Sep 22,2016 07:35 AM UTC ASP.NET Web Forms 1
Tags: Grid
Mirza Cavlicekic
Asked On September 21, 2016 09:34 AM UTC

I have got a function that selects a row and then move scrolled to show it. Moving scroller is working fine, but selecting row it is not working.  How can I select row in grid on client side?

My function looks like this:

        function rowSelect_Show() {
            var obj = $("#Grid1").ejGrid("instance");
            var rowHeight = obj.getRowHeight();
            var selectedRowIndex = 12;
            obj.getScrollObject().scrollY(rowHeight * selectedRowIndex);
            obj.model.selectedRowIndex = selectedRowIndex;
            var objDt = $("#Grid1").data("ejGrid");

Prasanna Kumar Viswanathan [Syncfusion]
Replied On September 22, 2016 07:35 AM UTC

Hi Mirza, 

Thanks for contacting Syncfusion support. 

To select a row in the grid, use selectRows method of ejGrid.  

Find the code example and sample: 

<ej:Grid ID="Grid" runat="server" AllowPaging="True" AllowScrolling="true"> 
        <ScrollSettings Height="300" Width="500" ></ScrollSettings> 
        <ClientSideEvents Create="create" /> 
    function create(args) { 
        var obj = $('#<%= Grid.ClientID %>').data("ejGrid"); 
        var rowHeight = obj.getRowHeight(); 
        var selectedRowIndex = 11; 
        obj.getScrollObject().scrollY(rowHeight * selectedRowIndex); 

Refer to the Help document for the selectRows method.  

Prasanna Kumar N.S.V 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon