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.

"Float" column

Thread ID:





35634 Oct 5,2005 12:12 PM Oct 5,2005 02:30 PM Windows Forms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On October 5, 2005 12:12 PM

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 12:49 PM

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 02:29 PM

You might want to add this as an enhancement.

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

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.

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.