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.

With of all columns _ including those not in view

Thread ID:

Created:

Updated:

Platform:

Replies:

23577 Jan 14,2005 10:06 AM Jan 14,2005 10:24 AM Windows Forms 1
loading
Tags: GridControl
Charles Vereker
Asked On January 14, 2005 10:06 AM

I have a DataBoundGrid control on a panel. When it is populated with data I want the panel to be sized to display just the first two columns. I have a button which, when pressed, I want to expand the panel so that all columns are visible. I don''t want to hide columns (ie the user can still scroll to the other columns when only the first two are visible). I can''t work out how to find the right size parameters to pass to the Panel.ClientSize property. (I don''t need to change the height, it is just the width) Thanks

Administrator [Syncfusion]
Replied On January 14, 2005 10:24 AM

To get the width of the first 2 column and the header column, try code like: int width = grid.Model.ColWidths.GetTotal(0,2); To get the width of all columns, try code like: int width = grid.Model.ColWidths.GetTotal(0,grid.Model.ColCount);

CONFIRMATION

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.

;