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.

Attaching a GridModel to a GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

61533 May 28,2007 09:27 PM May 29,2007 11:48 AM Windows Forms 1
loading
Tags: GridControl
Ben Fraser
Asked On May 28, 2007 09:27 PM

Hello,

I would like to be able to create a single view and change the model used by the view during runtime.

This code:

GridModel model = new GridModel();
gridControl1.ResetVolatileData();
model.QueryCellInfo += new GridQueryCellInfoEventHandler(GridQueryCellInfo);
gridControl1.Attach(model);

Gives me a blank form when run. What else do I need to call beyond Attach(model)?

The attached file shows the code working when the model is removed and the handlers are attached directly to the GridControl.

Cheers,
Ben

SeperateModelTest.zip

haneefm [Syncfusion]
Replied On May 29, 2007 11:48 AM

Hi Ben,

You can try setting the DefaultSize of the rows and columns in a GridModel. Here is a code snippet

model.Rows.DefaultSize = 19;
model.Cols.DefaultSize = 65;

gridControl1.Attach(model);

Best regards,
Haneef

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.

;