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 : Nov 16th 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:

Created:

Updated:

Platform:

Replies:

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

Hi,

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.

Regards,
Tracy

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";

                }

                else                  

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

            }

        }

 

Please let us know if you have any other queries .

 

Regards,

 

Akila


Attachment: GridTreeControl_1091ebb8.zip

CONFIRMATION

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.

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

;