Page 1 of 1

How do I display row number in the first column

Posted: Tue Oct 27, 2015 5:53 am
by Sirn Loong Toh

Hi guys,

How can I display the row numbers in my grid in the first column dynamically?

Image


How do I display row number in the first column

Posted: Tue Oct 27, 2015 8:09 am
by Serhii Kulibaba

Hello Sirn,

You have to:
1) create JS variable on the custom JS page:

var myNumber = 0;

2) add JS code on the first column mapping:
return myNumber++;


How do I display row number in the first column

Posted: Wed Oct 28, 2015 3:55 am
by Sirn Loong Toh

got it! thanks but I did something slightly different instead. I had to create a storage variable via the model and storage window then only map.

Is there a way I can do it via javascript instead of using the model and storage option like you mentioned?


How do I display row number in the first column

Posted: Thu Oct 29, 2015 1:25 pm
by Serhii Kulibaba

Sure, you can implement it with plain JS, without storage variables