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

Unselectable rows in grid

Thread ID:





120190 Sep 9,2015 12:48 PM UTC Sep 10,2015 06:17 AM UTC JavaScript 1
Tags: ejGrid
Stefano Enrico
Asked On September 9, 2015 12:48 PM UTC


can I set one or more rows of a grid as unselectable? by what method?


Balaji Marimuthu [Syncfusion]
Replied On September 10, 2015 06:17 AM UTC

Hi Stefano, 

Thanks for contacting Syncfusion support.

Your requirement is achieved by using the rowSelecting event in Grid which triggers before a row is selected.

Please refer to the Help document and code example as follows,

Document: http://help.syncfusion.com/js/api/ejgrid#events:rowselecting
Sample: http://jsplayground.syncfusion.com/x23vxig3


                // the datasource "window.gridData" is referred from jsondata.min.js

                dataSource: window.gridData,

                allowPaging: true,

                enableRowHover: false,


                . . .

                rowSelecting: function (args) {

                    var indexes = [0, 2, 4, 11];    // row indexes to be unselectable

                    if ($.inArray(args.rowIndex, indexes) != -1)

                        args.cancel = true;  //prevent selection



In above code example, we have prevented the row selection by setting the args.cancel as true to the row indexes 0, 2,4,11. So you can specify the indexes that are needs to be unselected in rowSelecting event.

Balaji Marimuthu


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

This page will automatically be redirected to the 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