DataGrid - How to have a column of sequence numbers (ascending) display dynamically on DataGrid which is not an attribute of entity. - Mendix Forum

DataGrid - How to have a column of sequence numbers (ascending) display dynamically on DataGrid which is not an attribute of entity.

0

I have content of entity displayed on the DataGrid (DG) but also requires a column on DG as a sequence number auto generated against the rows displayed. How do I display a serial number / column of integer in ascending order dynamically on the DG.

asked
3 answers
2

As Martijn already stated, you can create the sequence number in a microflow. However, since you do not want this sequence number as an attribute in your entity, you may want to use non persistent entities which are created in this microflow, showing the data you want to present in the datagrid, and in addition to the information from your persistent entity also comprise a field “Sequence”.

answered
0

I've used CSS in the past, but it was on a listview. You might get it to work on your datagrid?

For more details check https://css-tricks.com/custom-list-number-styling/

answered
0

You could fill the field with a microflow looping through all the records using an iterator. But why do you only want to display the sequence number on your data grid?

answered