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
close icon

Resize Button Bound Grid Columns

Hi,
I am trying to resize (Column Resize in Client) columns in a grid that has button templates. If I remove the button templates from the headers it works. However, if I have button templates in the header of the grid the resize functionality does not work. Any thoughts on this? The code is as follows:

// Get a simple datatable to bind the grid with
DataTable dt = GetData();

// Bind the datatabe to the Grid
this.GridGroupingControl1.DataSource = dt;
this.GridGroupingControl1.DataBind();

// my Button and TemplateButtonItem
Button myButton = new Button();
TemplateButtonItem tbi;

// Create the button templates for the grid
for (int i = 0; i < 3; i++)
{
myButton.ID = "Button" + i.ToString();
myButton.Text = "Button " + i.ToString();
myButton.BorderWidth = Unit.Parse("0px");

// Create the new template
tbi = new TemplateButtonItem(myButton);

// Add the template to the grid this.GridGroupingControl1.TableDescriptor.Columns[i].HeaderTemplate = tbi;
}

Thanks.
David.



1 Reply

JA Janagan Syncfusion Team April 10, 2008 01:06 PM UTC

Hi David,

Thanks for posting your query to us.

I am able to reproduce the issue of no column resize when buttons are added to the header template. The issue mentioned here is suspected to be a defect and we have sent this to our development team for more analysis. We will update you once we get back from our development team.

Thank you for your patience.

Regards,
Janagan.



Loader.
Live Chat Icon For mobile
Up arrow icon