We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set RowIndex

I want add rowindex with every sfdatagrid in my app like below.





                             <ResourceDictionary Source="pack://application:,,,/Some;component/Styles/Accents/Blue.xaml" />


            <Style TargetType="Syncfusion:GridRowHeaderCell">

                <Setter Property="Template">


                        <ControlTemplate TargetType="Syncfusion:GridRowHeaderCell">

                            <Border x:Name="PART_RowHeaderCellBorder"


                        BorderBrush="{TemplateBinding BorderBrush}"

                        BorderThickness="{TemplateBinding BorderThickness}">


                                    <!--RowIndex is displayed here -->


                                    Text="{Binding RowIndex,

                                    RelativeSource={RelativeSource TemplatedParent}}"

                                    TextAlignment="Center" />









But it's not work...... 

1 Reply

JG Jai Ganesh S Syncfusion Team April 22, 2016 04:23 AM UTC

Hi Ray,
We have prepared the sample by using your code snippet but the RowIndex is displayed in RowHeader as expected.
Live Chat Icon For mobile
Up arrow icon