This is a migrated thread and some comments may be shown as answers.

Row index in templates

3 Answers 518 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Felipe Casanova
Top achievements
Rank 1
Felipe Casanova asked on 11 Mar 2012, 12:01 PM
Are there any variables available in a template such as the row index number? Something like ${ rowIndex } that is available automatically.

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 12 Mar 2012, 02:59 PM
Hello Matt,

In the newest version of the framework, widgets are using the uid field of the DataSource's Model, which represents an unique id. This identifier is available in the templates ( ${ uid } ), however it is not an auto incrementing row index number. You can find more information on that subject in the changes and backward compatibility page.

All the best,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jon
Top achievements
Rank 1
answered on 16 Mar 2019, 04:38 AM
If you are inserting rows couldn't you just pass in a row number as a parameter?
0
Veselin Tsvetanov
Telerik team
answered on 20 Mar 2019, 03:42 PM
Hi Jon,

May I ask you to elaborate a bit on your question?  Do you need to pass a consecutive index (row number) to a given template instance? Can you provide a Dojo sample, which demonstrates the scenario in question?

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Templates
Asked by
Felipe Casanova
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Jon
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or