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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





23387 Jan 11,2005 05:23 PM UTC Jan 11,2005 06:33 PM UTC WinForms 3
Tags: GridControl
Asked On January 11, 2005 05:23 PM UTC

How can I get the range of cells being painted in the onPaint event? RangeInfoToRectangle is giving me a much larger range. For example, if I programmatically go to the end of the spreadsheet then the call to this.RectangleToRangeInfo(e.ClipRectangle), returns the entire spreadsheet from column 1 to my max number of columns. Thanks, Steve

Replied On January 11, 2005 05:43 PM UTC

I believe I''ve answered it. this.ViewLayout.RectangleToClientRowCol(e.ClipRectangle.... should give just the viewable cells being painted, correct?

Replied On January 11, 2005 06:25 PM UTC

Nevermind, that didn''t work after I scolled. What method should I use in the onPaint event to get the range of cells being painted? Thanks, Steve

Administrator [Syncfusion]
Replied On January 11, 2005 06:33 PM UTC

I think you do need to use this.ViewLayout.RectangleToClientRowCol. But this gives you the client row/col range (not absolute row/col). Once you have the client row/col range, you can add grid.LeftColIndex and grid.TopRowIndex to get the range I think you are looking for.


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

Live Chat Icon For mobile
Live Chat Icon