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

"Float" column

Thread ID:





35634 Oct 5,2005 04:12 PM UTC Oct 5,2005 06:30 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On October 5, 2005 04:12 PM UTC

Hi, How can I specify a column to be "float" width. i.e. it should occupy the remaining spce of the grid after other columns (of fixed) width''s have taken theirs..? Thanks.

Administrator [Syncfusion]
Replied On October 5, 2005 04:49 PM UTC

You can handle the grid.Model.QueryColWidth event. If the e.Index points to your floating column, you can set e.Size to be the size that you want the column to be. If floatCol is your float colindex, you can try code like:
if(e.Index == floatCol)
    e.Size = grid.ClientSize.Width - grid.Model.ColsWidths.GetTotal(0, floatCol - 1) - grid.Model.ColWidths.GetTotal(floatCol + 1, grid.Model.ColCount);
    e.Handled = true;
Here is a link to a KB that gives a helper class that offers a more general solution but is a little more involved. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=304

Administrator [Syncfusion]
Replied On October 5, 2005 06:29 PM UTC

You might want to add this as an enhancement.

Administrator [Syncfusion]
Replied On October 5, 2005 06:30 PM UTC

I mean have a flag, like: m_grid.ColWidths[i].IsFloat = true;


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

or the page will be automatically redirected to 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