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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Disable sorting on a MVC ejGrid

Thread ID:





143636 Mar 29,2019 02:26 PM UTC Apr 1,2019 05:34 AM UTC jQuery 1
Tags: ejGrid
Simon Bunya
Asked On March 29, 2019 02:26 PM UTC

                        dataSource: ej.DataManager({ url: "GetAllocation?param_ot=" + Order_Type + "&param_pc=" + itemcode, batchUrl: "UpdateAllocationHSIP", adaptor: "UrlAdaptor" }),
                      allowGrouping: false,
                      editSettings: { allowDeleting: true, allowEditing: true, allowAdding: true, editMode: 'batch' },
                        allowScrolling: true,
                        scrollSettings: { width: "100%", height: "auto" },
                        allowPaging: false,
                        enableAltRow: true,
                        showColumnChooser: true,
                        allowSorting: false,
                        allowTextWrap: true,
                        textWrapSettings: { wrapMode: "both" },
                        allowResizeToFit: true,
                        showStackedHeader: true,
                        isResponsive: true,
                        enableResponsiveRow: true,
                        allowScrolling: true,
                        allowFiltering: true,
                        filterSettings: {
                            filterType: "excel"
                        create: "create",
                        cellSave: "cellSave",
                        actionComplete: "successSave",
                        actionFailure: "failure",
                        columns: [
                            { field: "OrderNumber", headerText: "Order No.", visible: true, allowEditing: false, isPrimaryKey: true, width: 160 },
                            { field: "Facility", headerText: "Facility", visible: true, allowEditing: false, width: 100 },
                            { field: "DatePrepared", headerText: "Date Prepared", visible: true, allowEditing: false, width: 90 , format: "{0:dd/MMM/yyyy}" },
                            { field: "DrugCode", headerText: "Product Code", allowEditing: false, width: 70, isPrimaryKey: true },

Hello there, 

Above is my code for a JS grid and i want to disable sorting automatically on that grid, i have  tried using  "allowSorting: false  but its not working it keeps on sorting the records on the grid in ascending order, 

Please Advise!

Many Thanks 


Vignesh Natarajan [Syncfusion]
Replied On April 1, 2019 05:34 AM UTC

Hi Simon, 
Thanks for using Syncfusion products. 
Query: “i want to disable sorting automatically on that grid, i have  tried using  "allowSorting: false  but its not working it keeps on sorting the records on the grid in ascending order 
From your query, we understand that you are facing issue with sorting feature in ejGrid. We have prepared a sample using your code example and we are not able to reproduce the reported issue at our end. From your code example we found that you are using UrlAdaptor, actions like filtering, sorting etc will be handled in the server side. So reported issue may occur when it is not handled properly in the serverside.  
Kindly refer the below link for the sample prepared using version. 
Kindly share the following details to reproduce the reported issue at our end, 
  1. Share the Grid rendering code (server side).
  2. Share the video demonstration of reported issue and also share the details how the data is returned from server.
  3. Share your essential studio version (xx.x.x.xx)
  4. If possible share the issue reproducible sample or try to reproduce the reported issue in provided sample.
Vignesh Natarajan. 


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

Live Chat Icon For mobile
Live Chat Icon