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

Could the GridTreeControl indent at the second column?

Thread ID:





117503 Oct 31,2014 06:50 AM UTC Nov 5,2014 04:09 PM UTC WPF 1
Tags: GridTreeControl
Asked On October 31, 2014 06:50 AM UTC


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.


Akila Rajaram [Syncfusion]
Replied On 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


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

This page will automatically be redirected to the 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