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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make the last column of the ggc fill out the grid''s remaining area, if any exist?

Thread ID:





51692 Nov 10,2006 10:14 PM UTC Nov 22,2006 04:29 AM UTC WinForms 3
Tags: Grouping
Asked On November 10, 2006 10:14 PM UTC

I'm sure this has been answered somewhere on this forum before.

But here's what I'm trying to accomplish.

I want the LAST COLUMN of the ggc to fill out the remaining space, IF ANY, ot the grid area.

Can you all point me in the right direction!

Administrator [Syncfusion]
Replied On November 13, 2006 05:41 AM UTC

Hi James,

You can handle the TableModel.QueryColWidth and set the width of column using GetTotal method. Here is a code snippet

private void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e)
GridTableModel model = sender as GridTableModel;
GridTableDescriptor td = model.Table.TableDescriptor;

if( e.Index == td.VisibleColumns.Count)
e.Handled = true;

GridTableControl tc = this.gridGroupingControl1.GetTableControl(td.Name);
//To avoid the Stack Overflow Exception....you need to unsubscribe the QueryColWidth event
model.QueryColWidth -=new GridRowColSizeEventHandler(TableModel_QueryColWidth);
int width = tc.ClientRectangle.Size.Width - model.ColWidths.GetTotal(0,3) + 75 ;
model.QueryColWidth +=new GridRowColSizeEventHandler(TableModel_QueryColWidth);
e.Size = width;


Here is a sample.

Best Regards,

Replied On November 13, 2006 07:58 PM UTC

It works fine... the only problem is that now my column heading text has dissapear. The column header is there, but the text that was originally there is blank!

Administrator [Syncfusion]
Replied On November 22, 2006 04:29 AM UTC

Hi James,

Thanks for being patience.

We were not able to reproduce the issue here. Could you please provide a sample having the issue? This will help us to analyse the issue further.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon