Disable Sorting for specific column

Hi,
How do i disableSorting for specific column in ejs grid? need to remove sorting icon .
Thanks,
Sneha

1 Reply 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team April 2, 2021 03:35 AM UTC

Hi Sneha, 

Thanks for contacting Syncfusion support. 

Query: How do i disableSorting for specific column in ejs grid? need to remove sorting icon. 
 
By setting allowSorting property as false in the column settings, we can prevent the sorting action on that particular column. Please find the below code example and sample for more information. 
 
 
[app.component.html] 
 
<ejs-grid 
  class="sortingenabled" 
  [dataSource]="data" 
  allowPaging="true" 
  allowSorting="true" 
> 
  <e-columns> 
    <e-column 
      field="OrderID" 
      headerText="Order ID" 
      width="150" 
      textAlign="Right" 
    ></e-column> 
    <e-column 
      field="CustomerName" 
      headerText="Customer Name" 
      [allowSorting]="false"  // prevent Sorting action on particular column 
      width="170" 
    ></e-column> 
  </e-columns> 
</ejs-grid> 
 
 
 
Please get back to us if you need further assistance with this. 
 
Regards, 
Rajapandiyan S 


Marked as answer
Loader.
Up arrow icon