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. Image for the cookie policy date

ColStyles property in a virtual grid

I'm using Grid 4.4.0.51, .NET 2.0

I'm using a virtual grid. I change the amount of data in the backing array and update my variable so that queryColCount returns the new number of cols.

After this I assign to the ColStyles at an index below the number of columns in the grid. I get an exception thrown about index out of bounds.

Shouldn't the number of items in colstyles be getting bigger when queryColCount returns a larger value?

If it matters, the column count has increased from 0 to 16 just before the exception occurs.

Cheers,
Ben

1 Reply

HA haneefm Syncfusion Team May 10, 2007 05:39 PM UTC

Hi Ben,

If you want to use the grid's internal storage, you would need to set the column count on the grid's Data object.

this.gridControl1.Model.Data.ColCount = newvalue;

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon