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

Auto extending a column in a GridGroupControl

Is it possible to auto extend a specified column so it fills the available width of the GGC. (NOTE: the column is not the last one)

An example would be, I have 5 columns, the second is a description column. I would like to extend the description column to fit the maximum size of the grid, i.e. auto extend to fill the available space. If this is possible what happens when the gird is resized to a small or large size ?

2 Replies

JS Jeba S Syncfusion Team August 17, 2007 07:31 AM UTC

Hi James,

Thank you for your details.

To dynamically provide column widths, you must handle the grid's QueryColWidth event. In your handler, you must dynamically provide the width of any column. The below sample shows how you can have the right-most or left-most column grow to fill the grid's client area as the grid size changes.

The attached sample will allow you to use a helper class to manage this functionality. The helper class supports the left or right column fill the client area. You can customize the helper class depends on your requirement.

Please refer the sample which implements the above said feature:
http://websamples.syncfusion.com/samples/Grid.Windows/F67383/main.htm

Please refer this KB article which explains "How to allocate equal size for each of the columns in all the tables of a GridGroupingControl?"
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=356

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Best Regards,
Jeba.


JS Jeba S Syncfusion Team August 17, 2007 07:32 AM UTC

Hi James,

Thank you for your details.

To dynamically provide column widths, you must handle the grid's QueryColWidth event. In your handler, you must dynamically provide the width of any column. The below sample shows how you can have the right-most or left-most column grow to fill the grid's client area as the grid size changes.

The attached sample will allow you to use a helper class to manage this functionality. The helper class supports the left or right column fill the client area. You can customize the helper class depends on your requirement.

Please refer the sample which implements the above said feature:
http://websamples.syncfusion.com/samples/Grid.Windows/F67383/main.htm

Please refer this KB article which explains "How to allocate equal size for each of the columns in all the tables of a GridGroupingControl?"
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=356

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Best Regards,
Jeba.

Loader.
Live Chat Icon For mobile
Up arrow icon