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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

68978 Oct 8,2007 06:12 AM Oct 8,2007 07:51 PM Windows Forms 1
loading
Tags: GridControl
Nick
Asked On October 8, 2007 06:12 AM

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.

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

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

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.

;