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

Changing column size on the fly and forcing changes into the grid

Thread ID:





68978 Oct 8,2007 10:12 AM UTC Oct 8,2007 11:51 PM UTC WinForms 1
Tags: GridControl
Asked On October 8, 2007 10:12 AM UTC


I have created a custom control that contains a GridControl. I have a custom-defined structure in my custom control that defines column widths. During initialization, the gridcontrol inside my custom control is initialized and the QueryColWidth handler is invoked. However the column widths are defined in the form InitializeComponent, something like:

private void InitializeComponent() {
... this.xPropertyGrid1.DefaultHeaderStyle = ... this.xPropertyGrid1.DefaultValueStyle = ...

These style objects contain the new column widths. As part of the custom controls initialization, the form sets its TabIndex to 0, and some how this seems to initiate the internal GridControl to ask for new column widths on the QueryColWidth handler. In here I provide the newly assigned widths, but the actual rendered grid does NOT seem to reflect these widths - its as if the widths have been ignored.

Any advice?


haneefm [Syncfusion]
Replied On October 8, 2007 11:51 PM UTC

Hi Nick,

Thank you for your update.

I have tested the attached sample to reproduce this issue, but could not get this. Maybe I am not following the steps that you are doing. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Sample : F68798GridCustomControl.zip

Best regards,


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