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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set RowIndex

Thread ID:





123785 Apr 21,2016 07:02 AM UTC Apr 22,2016 04:23 AM UTC WPF 1
Tags: SfDataGrid
Asked On April 21, 2016 07:02 AM UTC

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...... 

Jai Ganesh S [Syncfusion]
Replied On 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.

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon