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

Header Template

Thread ID:

Created:

Updated:

Platform:

Replies:

69090 Oct 12,2007 08:16 PM UTC Oct 18,2007 03:06 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
David A. Gonzales
Asked On October 12, 2007 08:16 PM UTC

Hi,
I have a GridGrouping Control that has headers composed of Buttons using the HeaderTemplate:

TemplateButtonItem tbi = new TemplateButtonItem();

Then I fill in the button info (ie, Text, onClick event, etc) and assign that to the GridGrouping Control:

GridGroupingControl1.TableDescriptor.Columns[ColID].HeaderTemplate = tbi;

This works fine but I need to update the Headers based upon new user information after the Grid is bound to the datasource. How can I get a reference to the TemplateButtonItem and then update the Text property off the button object?

I know it's simple, i just can't get the stuff to work.

Thanks.

David.

Rajarajeswari S [Syncfusion]
Replied On October 18, 2007 03:06 PM UTC


Hi David,

Thanks for using Syncfusion products.

The text property of the button object can be updated by accessing the object which we assigned to the HeaderTemplate and TypeCast it to the appropriate class type.

Please refer the below code snippet to access the Template object.

TemplateButtonItem mytemp = ((TemplateButtonItem)this.GridGroupingControl1.TableDescriptor.Columns[3].HeaderTemplate);

then you can use the mytemp object to set the text property of the button


Please let me know if this helps you.

Regards,
S.Rajarajeswari

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

;