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

GridControlDesigner & Resizing of columns and Rows

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


5 Replies

KR Kiran Reddy September 26, 2006 04:52 AM UTC


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



AD Administrator Syncfusion Team September 26, 2006 05:44 AM UTC

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


KR Kiran Reddy October 3, 2006 10:21 AM UTC

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


KR Kiran Reddy October 4, 2006 08:47 AM UTC

Hi,

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

Regards
Kiran


AD Administrator Syncfusion Team October 4, 2006 01:04 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon