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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Attaching a GridModel to a GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

61533 May 29,2007 01:27 AM UTC May 29,2007 03:48 PM UTC WinForms 1
loading
Tags: GridControl
Ben Fraser
Asked On May 29, 2007 01:27 AM UTC

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 03:48 PM UTC

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.

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

;