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.

GridControlDesigner & Resizing of columns and Rows

Thread ID:

Created:

Updated:

Platform:

Replies:

49715 Sep 25,2006 09:58 AM Oct 4,2006 09:04 AM Windows Forms 5
loading
Tags: GridControl
Kiran Reddy
Asked On September 25, 2006 09:58 AM

Hi,
I have my own grid derived from GridControl. Apart from certain customization (look and feel, adding custom controls to cells), I am resizing the rows and columns proportionately when the grid is resized. By proportionately I mean, the first column is 50% and each other 5 columns occupy 10% of the client area and when the grid is resized by 10 points, the first column is increased by 5 points and each other column is increased by 1 point.

I am doing this by calculating the ratios of columns during start up and in QueryColWidth, column width is determined based on this ratio and grid size as specified in one of the KB articles. I am also calculating the ratios again in ColWidthsChanged event.

The issues are as follows:

1) When I click on ''Edit'' verb, the current size of the grid is reflected in the GridControlDesigner. The desiner should reflect the current state of the grid.
2) The changes(especially column and row resizing) made in the designer is not reflected in the actaul grid. When I close the designer, ColWidthsChanged event is fired. But the event args doesn''t give the proper information. The e.From and e.To are always zero irrespective of what ever changes I have done in designer. I have to change the ratios according to the changes made in the designer.

Please let me know how to fix the above issues. I can provide sample of What I am doing if required. Thanks.

Regards
Kiran


Kiran Reddy
Replied On September 26, 2006 12:52 AM


A correction, issue 1) When I click on ''Edit'' verb, the current size of the grid is ''not'' reflected in the GridControlDesigner. The desiner should reflect the current state of the grid

>Hi,
I have my own grid derived from GridControl. Apart from certain customization (look and feel, adding custom controls to cells), I am resizing the rows and columns proportionately when the grid is resized. By proportionately I mean, the first column is 50% and each other 5 columns occupy 10% of the client area and when the grid is resized by 10 points, the first column is increased by 5 points and each other column is increased by 1 point.

I am doing this by calculating the ratios of columns during start up and in QueryColWidth, column width is determined based on this ratio and grid size as specified in one of the KB articles. I am also calculating the ratios again in ColWidthsChanged event.

The issues are as follows:

1) When I click on ''Edit'' verb, the current size of the grid is reflected in the GridControlDesigner. The desiner should reflect the current state of the grid.
2) The changes(especially column and row resizing) made in the designer is not reflected in the actaul grid. When I close the designer, ColWidthsChanged event is fired. But the event args doesn''t give the proper information. The e.From and e.To are always zero irrespective of what ever changes I have done in designer. I have to change the ratios according to the changes made in the designer.

Please let me know how to fix the above issues. I can provide sample of What I am doing if required. Thanks.

Regards
Kiran


Administrator [Syncfusion]
Replied On September 26, 2006 01:44 AM

Hi Kiran,

See this Knowledge base article which demonstrates the way to resize the columns in a grid.

KB : http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=304

If this did not help, please update us with a sample project showing the problem.

Best Regards,
Haneef

Kiran Reddy
Replied On October 3, 2006 06:21 AM

Hi,

PFA the sample demonstrating the specified probelms. Please follow the below steps to reproduce them.

1) Open the project in Visual Studio 2005.
2) Open the TestForm in Design Mode. From the toolbax, add ''MarketDepth''control in POC.UI.Forms.Grid tab to the form. If ''MarketDepth'' is not present in the toolbox, please build the solution.
3) Resize the form.
Issue: The visual effect of the resize is not rendered along with the resize drag operation. It takes time to show the visual effect.
4) Open GridControl Designer. (Right click on the grid and choose ''Edit'')
Issue: The actaul size of the grid is not effective in the designer. The desinger shows the grid initial size.
5) Inside the grid, resize rows and columns inidividually, to change the row and column proportions.
6) Close the designer.
Issue: The changed proportions are not effective in the actual grid. This is the main issue. This is the only way a user can change proportions.
Issue: The custom controls in cells are not displayed. It shows Exception in each cell. It seems the controls are disposed. This can be known when you try to launch GridControl Designer.

Please let me know what has to be done to fix these problems. Thanks in advance!

Regards
Kiran

POC.UI.Forms.zip

Kiran Reddy
Replied On October 4, 2006 04:47 AM

Hi,

Please let me know what should be done to fix the above issues. Thanks.

Regards
Kiran

Administrator [Syncfusion]
Replied On October 4, 2006 09:04 AM

Hi Kiran,

Thanks for your update. We will work out for a solution and let you know the details soon. Thanks for being patience.

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.

;