How to display row numbers in a ListView?

前端 未结 10 887
盖世英雄少女心
盖世英雄少女心 2020-11-27 04:33

The obvious solution would be to have a row number property on a ModelView element, but the drawback is that you have to re-generate those when you add records or change sor

10条回答
  •  遥遥无期
    2020-11-27 05:22

    First you need to set the AlternationCount to items count+1, for instance:

    
    

    Then AlternationIndex will show the real index, even during the scrolling:

     
    

提交回复
热议问题