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

Multiple GridModels and a Single GridControlBaseImp

Thread ID:





63097 Jun 28,2007 06:52 AM UTC Jun 28,2007 09:37 AM UTC WinForms 1
Tags: GridControl
Ben Fraser
Asked On June 28, 2007 06:52 AM UTC


I have multiple Virtual GridModels that I want to be able to modify programmatically in the background (that is, while not attached to a GridControlBaseImp) and then switch the background GridModel to be attached to the GridControlBaseImp and display its contents. In the application I am going to be switching backwards and forwards between GridModels numerous times. I also want to be able to access the contents of the GridModel without attaching it to a GridControlBaseImp, to see all of my changes, and have the QueryCellInfo et al methods getting fired. Is this sort of thing at all possible or should I be trying something completely different?

If it is possible, this is my specific problem. I can switch the models just fine and get the correct results. I am not having any luck modifying the model in the background without having it attached to the grid.

The results I am getting seem to me to mean I am not detaching the previous model properly before attaching to the next model. Also, it kind of looks like requests I am making of the model are getting forwarded to the controlbaseimp rather than calling my QueryCellInfo but that is probably because I haven't hooked things up correctly.

Is it possible to modify a GridModel not attached to a GridControlBaseImp (or any other type of GridControl)? What do I have to do to completely remove the connection between a model and a control?

I suppose an example of how to have a number of virtually bound GridModels, modify them without attaching them to a grid and then switch them around between a single GridControlBaseImp is what I am looking for, if that pattern of use is at all possible.


Administrator [Syncfusion]
Replied On June 28, 2007 09:37 AM UTC

In a true virtual grid, the GridControl (and hence GridModel) does not really store anything. It serves strictly as a conduit to the virtual data source. So, instead of thinking about have multiple GridModels and 1 GridControl, I think it better fits the grid's virtual architecture, to think about multiple DataSources and 1 GridControl.

Here is a little sample that illustrates this idea. Will something like this serve your needs?



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