Display RadListItem Index in DataTemplate

2 posts, 0 answers
  1. Darryl
    Darryl avatar
    6 posts
    Member since:
    Oct 2012

    Posted 15 Feb 2013 Link to this post

    I have a need to display the list item index + 1 in the list item data template.  I have created and converter for the index value, but I cannot seem to get the code to bind to the index.  any examples or suggestions on what property to look at would be great.

    Thank you.
  2. Darryl
    Darryl avatar
    6 posts
    Member since:
    Oct 2012

    Posted 15 Feb 2013 Link to this post

    Never mind I figured it out.

    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=telerik:RadListBoxItem}, Converter={StaticResource rowNumberConverter}, StringFormat=' {0}) '}" Grid.Row="0" Grid.Column="0" Margin="2,5,0,0" />
  3. DevCraft banner
Back to Top