I am using this for my angular grid
我用这个作为我的角网格
http://ui-grid.info/
and i want to add serial numbers to all rows.
我想给所有的行添加序列号。
I tried this
我试着这
{name: 'ID', field: '', displayName: 'Row Number', cellTemplate: '<div>{{row.rowIndex + 1}}</div>'},
But it keep showing on 1
in the column. Lool like row.rowIndex
is not giving returning anything.
但它一直在列1上显示。显得像一行。rowIndex不返回任何东西。
How can i fix that. Thanks
我怎样才能解决这个问题呢?谢谢
1 个解决方案
#1
2
I was very much on to hacking ui-grid found that interpolation of 'rowRenderIndex' solved for me.
我非常喜欢破解ui-grid,发现‘rowRenderIndex’的插值为我解决了。
use
使用
<span>{{rowRenderIndex+1}}</span>
for serial numbers in ui-grid
用于ui网格中的序列号
#1
2
I was very much on to hacking ui-grid found that interpolation of 'rowRenderIndex' solved for me.
我非常喜欢破解ui-grid,发现‘rowRenderIndex’的插值为我解决了。
use
使用
<span>{{rowRenderIndex+1}}</span>
for serial numbers in ui-grid
用于ui网格中的序列号