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.

Multiple GridModels and a Single GridControlBaseImp

Thread ID:

Created:

Updated:

Platform:

Replies:

63097 Jun 28,2007 02:52 AM Jun 28,2007 05:37 AM Windows Forms 1
loading
Tags: GridControl
Ben Fraser
Asked On June 28, 2007 02:52 AM

Hello,

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.

Thanks,
Ben

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

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?


VirtGridMultipleDataSources.zip

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.

;