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

Could the GridTreeControl indent at the second column?


I have a requirement to  let the first column  aligned, and start to indent from the second column. Is it possible with the GridTreeControl? As as the structure below:

Index           Name                      
1                   test1                         
2                           test1.1              
3                   test2                         
4                          test2.1               
5                          test2.2               
6                                     test2.2.1 

Very appreciated for any of your reply.


1 Reply

AR Akila Rajaram Syncfusion Team November 5, 2014 04:09 PM UTC

Hi Tracy,


Thank you for using Syncfusion Products.


We have analyzed your requirement . You can achieve your requirement by enabling the ShowRowHeader API.  The cell values for the RowHeaders can be given inside in QueryCellInfo event . We have prepared the sample based on your requirement .Please find the below attached sample .


Please find the below code snippet ,


Code Snippet:


void Model_QueryCellInfo(object sender, Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs e)


            if (e.Style.ColumnIndex == 0)


                if (e.Style.RowIndex == 0)


                    e.Style.CellValue = "Index";



                    e.Style.CellValue = e.Cell.RowIndex;




Please let us know if you have any other queries .





Attachment: GridTreeControl_1091ebb8.zip

Live Chat Icon For mobile
Up arrow icon