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

Getting grid in OnQueryPreferredClientSize

Thread ID:





29185 May 18,2005 04:58 PM UTC May 18,2005 06:34 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On May 18, 2005 04:58 PM UTC

I need to handle the OnQueryPreferredClientSize in a number of custom cell types. The problem is, we maintain margin information in a theme that''s associated with our derived grid control and to get access to that margin information, I need access to the grid. I can''t see how to do this from OnQueryPreferredClientSize(). Am I missing something? I know that a model may be associated with one or more grids, but the Graphics object passed to OnQueryPrefferedClientSize must clearly be associated with A particular grid. I can''t see any obvious way to get to the grid control from the style or model. Thanks for any help you can offer. Pete

Administrator [Syncfusion]
Replied On May 18, 2005 06:34 PM UTC

The GridModel is usually passed in when the cellmodel is contructed. You can keep a private reference to this gridmodel. Then when you want the grid, you can try using gridmodel.ActiveGridView. You probably need to make sure it is not null before you start using it.


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