Sorting a datagrid column right justified

4
Is it possible to sort a datagrid column right justified? If yes, where/how can I set this? Example of the data now: 1 101 10001 2 201 20001 Example of the desired sort behaviour: 1 2 101 201 10001 20001
asked
2 answers
8

You should use an integer (I suppose you are using a string) to sort the values as followed:

1
2
101
201
10001
20001

Currently ordering right justified isn't possible. Please add a feature request in our Mendix Partner Portal.

answered
2

There is a way to do this with styling. You have to give the datagrid a custom css-class and then you can do something like this:

.CustomClass .mendixDataGrid_dataContainer {
   text-align:right !important;
}

But that means all the columns will be aligned to the right. If Mendix adds the possibility to add a custom css class to a column of a datagrid, it will be easier.

answered