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

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

Hi,

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?

Nick.

1 Reply

HA haneefm Syncfusion Team 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,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon