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.
Unfortunately, activation email could not send to your email. Please try again.

GridTreeControl - how to customize the header of one column?

Thread ID:

Created:

Updated:

Platform:

Replies:

108844 May 15,2013 06:39 AM Jul 25,2013 04:38 AM WPF 3
loading
Tags: GridControl
Simon Dahlbacka
Asked On May 15, 2013 06:39 AM

I haven't been able to find any info on how to do this,

Basically, I want to have a hyperlink in one column header:

I also tried to put the new control on top of the gridtreecontrol, but then I did not manage to hide the previous HeaderText, if I specify an empty string or {x:Null} then the GridTreeControl 'helpfully' sets the Header equal to MappingName.

So, how to do it?

Gobinath A [Syncfusion]
Replied On June 20, 2013 07:09 AM

Hi Simon,

 

Sorry for the delay in getting back to you.

 

We have analyzed your query and you can achieve your requirement by using following code snippet.

 

Code snippet[C#]:

 

this.treeGrid.InternalGrid.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo);

 

void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)

 {

    if (e.Style.ColumnIndex == 2 && e.Style.RowIndex==0)

      {

        e.Style.CellType = "Hyperlink";

 

       //you can customize the header text using e.Style.CellValue=””;

 

      }

  }

 

We have prepared the sample based on your requirement and please find the sample under the following location.

 

Sample: CellEditorsDemo_2010.zip

 

Please let us know if you have any queries.

 

Regards,

Gobinath A.

 

 


Simon Dahlbacka
Replied On July 3, 2013 07:12 AM

Ok, that seems to work

(If we ignore the fact that alignment and margins are totally off and the colors look horrible...)

Gobinath A [Syncfusion]
Replied On July 25, 2013 04:38 AM

Hi Simon,

 

Sorry for the delay in getting back to you.

 

We are unable to understand what you have mentioned in this line “If we ignore the fact that alignment and margins are totally off and the colors look horrible” so could you please more information regarding your update.

 

Regards,

Gobinath A.

 


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.

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.

;