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

ColStyles in Virtual Mode

Thread ID:

Created:

Updated:

Platform:

Replies:

8760 Nov 19,2003 11:45 AM UTC Nov 19,2003 12:22 PM UTC WinForms 1
loading
Tags: GridControl
Wayne Hartell
Asked On November 19, 2003 11:45 AM UTC

Am using the Syncfusion Grid in virtual mode supplying the cell data using this method, but have been allowing the grid's own data cache to supply base styles, including column styles which we tweak as necessary upon grid initialization. A problem we are experiencing is that if we have more columns than the default of 10, the ColStyles cache in the grid does not expand to suit the number of columns we specify in the QueryColCount event. Is there any way to get the grid to refresh its cache to expand the number of ColStyles to suit the actual number of columns, without having to supply our own ColumnStyle cache and answer that information in QueryCellInfo? We want to be able to add and remove columns dynamically, so don't want to assume some number of maximum columns. Thanks, Wayne.

Administrator [Syncfusion]
Replied On November 19, 2003 12:22 PM UTC

In a virtual grid, the grid does not allocate any storage for row and column objects. In order to get the grid to allocate storage for these column styles, you would have to explicitly set either grid.ColCount or gridModel.Data.ColCount to reflect the values you need to have. You cannot just provide the value in QueryColCount as this does not allocate storage. The difference between using grid.ColCount and grid.Model.Data.ColCount is that the latter avoids the event handling (like QueryColCount). So, if you set the colcount on the data object, I think you could still effectively use QueryColCount if you need that flexibility. Other wise, you could try removing QueryColCount and just set grid.ColCount whenever the number of your columns change.

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.

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

;