Data grid2 Serial number

I want each row of data grid2 to generate a random serial number when the data is added, how to implement this?
1 answers

Hi ErkangHui,

the datagrid itself can't generate a serialnumber. 

You'll need to add an attribute to the entity you're showing in the datagrid2. Where you can add a serialnumber in that attribute on creation of the new object. 


In the string utils of the community commons there is a randomHash function, which you could use to generate the serialnumber, or create your own function.