RSS

Category Archives: Disable Automatic Grid Sort

Disable Form grid column automatic sorting feature

I have been asked by customer to enable sorting only on one field and one should not be able to sort by using other grid fields/controls.

in simple words he wants me to disable automatic sorting feature on other fields on grid except one so that when the user clicks the column header, the order displayed would not change.

i found dynamics community conversation to achieve this quick manner.I have added an override method sort() on each grid control where i wants to disable automatic sorting and also blocked super.

sort method

 

public int sort(SortOrder _sortDirection)
{
 int ret;

 //ret = super(_sortDirection);

 return ret;
}

 

Happy Daxing 🙂

References :
How can I disable the automatic sort on the grid?
Preventing users from sorting a grid

 

Tags: , , , , ,