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

Expand details of selected record

Thread ID:





121226 Nov 19,2015 05:26 PM UTC Nov 20,2015 06:50 AM UTC JavaScript 1
Tags: ejGrid
Asked On November 19, 2015 05:26 PM UTC

Hi Team,

How do I expand the details of the selected record? If I understand it right, the expandCollapse method would handle this but I'm confused on how to get the target object I needed to pass as parameter.
I tried $("#Grid").ejGrid("expandCollapse", $("tr td.recordplusexpand > div").first()); but it didn't work for me.

I hoe you could provide me some guidance on this matter. Thanks.

Balaji Marimuthu [Syncfusion]
Replied On November 20, 2015 06:50 AM UTC

Hi Lory,

Thanks for contacting Syncfusion support.

Your requirement is achieved using the rowSelected event in Grid and you can get the target of the selected row using args.row. Refer to the sample and code example as below.
Jsplaygroundsample: http://jsplayground.syncfusion.com/t04qydpu


                dataSource: window.employeeView,

                allowGrouping: true,

                allowSorting: true,

                 . . .

                childGrid: {

                    dataSource: window.gridData,

                    queryString: "EmployeeID",

                    allowPaging: true,

                    . . .


                rowSelected: function (args) { //event triggered for parent grid


                    //other way

                    //$("#Grid").ejGrid("expandCollapse", args.row.find('.e-detailrowcollapse'));                },


Help Document: http://help.syncfusion.com/js/api/ejgrid#events:rowselected

In above code example we have passed the selected records e-detailrowcollapse target, to expand the details of selected record in DetailTemplate and Hierarchy Grid.

To perform both expand and collapse when select the records, you can use the below code example:

                rowSelected: function (args) { //event triggered for parent grid



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