AFAIK sorting cannot be disabled in a datagrid.
It is as the others mentioned, sorting can’t be disabled on a datagrid using Mendix till now. However, this can be done using CSS. You will need to set the pointer event property to none. Below is definition of the class “datagridwithoutsorting ” that should be used on the datagrid that you want to disable sorting on.
.datagridwithoutsorting th { /* disabling pointer events */
pointer-events: none;
}
.datagridwithoutsorting .mx-datagrid-column-resizer { /* enabling the column sizer */
pointer-events: auto;
}
Bit late, but that sorting functionality is disabled when the source of the datagrid is a microflow.
Not sure why you would want to disable sorting ?
But assuming you dont mind the resulting randomness, actualy any field would do, alternativly Add a filed to the object(s) sorted that is a constant and sort on that.
Possibly hide the datagrid header row through your CSS file?
Sort in a seperate microflow and restrict access to that microflow once you're modeling in the Production Security level.