Mozart
January 22, 2014, 7:41am
#1
Hi,
Is it possible to have a column that would have a row number (count) that wouldn’t change when the table is sorted by other columns?
Here’s an example of what I want to happen:
No. Name
1 Bill
2 Zac
3 Aaron
Sorting by Name would give:
No. Name
1 Aaron
2 Bill
3 Zac
sematik
January 23, 2014, 12:59pm
#2
Please, try to use the “counter” exCell type.
Here you can find a working example:
dhtmlx.com/docs/products/dht … _cntr.html
Mozart
January 23, 2014, 1:37pm
#3
Thank you, that worked.
The only problem is, after filtering it messes up the row count. I have to do some type of sorting to bring it back to order. Is there a way to fix this issue?
Thank you again!
sematik
January 23, 2014, 3:00pm
#4
Please, try to call the resetCounter() method after the filtering:
mygrid.attachEvent("onFilterEnd", function(elements){
mygrid.resetCounter(col_ind)
});
Mozart
January 23, 2014, 3:27pm
#5
Thank you very much, that worked perfectly!