Disable sorting on a datagrid

3
Is it possible to disable sorting by a user on a datagrid? If so, how? Now if a user clicks on a column header, the datagrid will be sorted on this column. My client doesn't want the user to change the sorting of the grid.
asked
6 answers
0

AFAIK sorting cannot be disabled in a datagrid.

answered
3

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;
}

 

answered
2

Bit late, but that sorting functionality is disabled when the source of the datagrid is a microflow.

answered
0

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.

answered
0

Possibly hide the datagrid header row through your CSS file?

answered
-2

Sort in a seperate microflow and restrict access to that microflow once you're modeling in the Production Security level.

answered