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. Image for the cookie policy date
close icon

Getting grid in OnQueryPreferredClientSize

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

1 Reply

AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon