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.

How to know the size of virtual grid

Thread ID:





91052 Nov 2,2009 04:01 AM Nov 3,2009 07:45 AM Windows Forms 4
Tags: GridControl
Chen Yujun
Asked On November 2, 2009 04:01 AM

Hi experts,

How can I know the size of a virtual grid before it actually display on the control? I have a list of virtual grids to show in one panel, so I have to calculate the size of each one to decide the location of the next one. Do you have any experience on this?

many thanks!


Rajadurai C [Syncfusion]
Replied On November 2, 2009 09:10 AM

Hi Chen,

Thanks for your interest in Syncfusion Products.

The size of the grid whether it is virtual or not, can be get through the ClientSize property of grid. Based on the width retrieved from the client size of one grid, you can place the next grid in panel accordingly.


Chen Yujun
Replied On November 3, 2009 05:25 AM

Hi Rajadurai,

Thanks for replying!

I hook up these events for virtual grid: QueryRowCount, QueryColCoun, QueryRowHeight and QueryColWidth. But they are not called when I get the ClientSize of the gridControl. Instead it return a very strange size. Is there anything I must do before I call ClientSize?


Chen Yujun
Replied On November 3, 2009 05:44 AM

Another thing to mention,

I try to call ResetVolatileData before get ClientSize, but still doesn't work. Anything wrong?

Rajadurai C [Syncfusion]
Replied On November 3, 2009 07:45 AM

Hi Chen,

Thanks for your update.

The clientsize of the grid can be changed only by changing the grid size at design time or when the grid is resized which can be done only by setting ClientSize property, wherever needed at runtime. It doesn't depend on the type of the grid whether it is virtual or not.

The clientsize doesn't differ because of any actions handled other than those mentioned above.

Please let me know if you need any further assistance.



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.