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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Out of Bounds Exception when Virtual Model Changes

Thread ID:





1964 Dec 6,2002 03:33 PM UTC Dec 6,2002 10:32 PM UTC WinForms 1
Tags: GridControl
Robert Bergelson
Asked On December 6, 2002 03:33 PM UTC

I am using the QueryCellInfo, SaveCellInfo, QueryRowCount, QueryColumnCount et. al. events to manage, populate, and persist the cells in a grid. I am using an underlying model ( as in model, view, control ) of my own construction to hold the data which the grid displays. When the model changes ( has fewer row objects for example ) I am finding that no matter what I try ( calling resetVolatileData, and/or explicitly setting the RowCount parameter on the gridControl) the grid still thinks the model has the old number of rows and asks for data which overflows the bounds of my cache. Am I missing something ? Thx, Bob

Administrator [Syncfusion]
Replied On December 6, 2002 10:32 PM UTC

Bob, If you are trying to use a true virtual grid, you should never explicitly set GridControl.RowCount (or GridControl.Model.RowCount). Doing so, makes the GridData object allocate storage for that many rows. In a virtual grid, you don't want the grid to allocate any row storage. Instead, you want the grid to use exactly the same data (and hence data storage) as your external data source. You do this by only providing the rowcount exclusiively through QueryRowCount. So, if your external data source removes/adds rows, then try calling GridControlResetVolatileData followed by GridControl.Refresh. You should not have to do anything in regard to setting GridControl.RowCount as your QueryRowCount should auotmatically provide the correct row count based on your external data source. Clay


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

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

Live Chat Icon For mobile
Live Chat Icon