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

childGrid using sorting from main grid datamanager

Thread ID:





124628 Jun 19,2016 10:46 PM UTC Jun 21,2016 12:58 PM UTC JavaScript 3
Tags: ejGrid
David Barrett
Asked On June 19, 2016 10:46 PM UTC

I am loading a grid with a url connector, and loading data for the child grid from another datamanager.

The loading is fine and I can pull up the correct child grids and page through the contents. 
My issue comes when someone clicks on the header row of the child grid and it tries to sort the child grid. When that happens it tries to use the sorting mechanism from the main grid and crashes. 
Also when someone dblclicks on a child row it returns an error becuase it is trying to edit the child row data. I am happy to have no sorting or editing capabilities on the child grid but none of the options I tried seemed to make a difference. I got the basic childGrid commands off of the javascript api on the website under heirarchical data but there is no mention there about sorting/editing and how to handle it or prevent it (if its on in main table) 

I have included the javascript that I am using to attempt this. 

Thanks for any help or information

<div class="col-lg-12 admin-area">
<div class="panel panel-default">
<div class="panel-heading"><h4 class="panel-title text-center">Districts</h4></div>
<div class="panel-body">
<p class="text-bold">Below are the current school districts in the system. </p>
<div id="griddists"></div>
<script type="text/javascript">
/* Setup Contacts Table and Editing */
var distdata = ej.DataManager({
adaptor: new ej.UrlAdaptor()
var distchild = ej.DataManager({
adaptor: new ej.UrlAdaptor()
var distgrid = $("#griddists").ejGrid({
            dataSource: distdata,
isResponsive: true,
enableResponsiveRow: true,
endAdd: function(){$("#griddists").ejGrid("refreshContent");},
endEdit: function(){$("#griddists").ejGrid("refreshContent");},
columns: [
                { field: "district_id", allowEditing:false, isIdentity:true, isPrimaryKey: true, headerText: "ID", width:75 },
                { field: "district_name", headerText: 'District Name', validationRules: { required: true, minlength: 2 } },
                { field: "district_number", headerText: 'Number', validationRules: { required: false } }
contextMenuSettings: { enableContextMenu: true},
editSettings: {allowEditing: true, allowAdding: true, allowDeleting: true, showDeleteConfirmDialog:true},
            toolbarSettings: {
            showToolbar: true, 
            toolbarItems: [
            childGrid: {
dataSource: distchild,
queryString: "district_id",
allowSorting: false,
allowPaging: true,
pageSettings:{pageSize: 5},
columns: [
{ field: "school_id", allowEditing:false, isIdentity:true, isPrimaryKey: true, headerText: 'ID', width:75},
{ field: "school_name", allowEditing:false, headerText: 'Name'},
{ field: "school_number", allowEditing:false, headerText: 'Code'}

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On June 20, 2016 03:55 PM UTC

Hi David,  

We are able to reproduce the problem at our end after enabling the isResponive property to parent Grid. We don't have to respondive Grid support with childGrid. So we suggest to disable the isResposive property of parent Grid. 

Seeni Sakthi Kumar S. 

David Barrett
Replied On June 20, 2016 04:33 PM UTC

Thanks for the information,

by chance is there any way to disable the sorting capabilities on the child table as that is what is causing the issue and I don't really need it for what this is being used for. Can I interrupt the clicks on those objects and drop the request? Do you know if there is a common naming for the child grid areas

Thanks for you help

Mani Sankar Durai [Syncfusion]
Replied On June 21, 2016 12:58 PM UTC

Hi David 
We have logged the requirement as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.  
Manisankar Durai 


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