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

Converting a range to a rectangle

I have a range that is a row or multiple rows. What I want to do is get a rectangle that covers whatever is visible of that row. I tried: Rectangle rect = rect = rid.ViewLayout.RangeInfoToRectangle(range, true, GridCellSizeKind.ActualSize); This works fine, except it doesn''t include row headers. Is there a simple way to have it include the row headers? In an unrelated issue, is there any way to "unfreeze" a row header? Thanks Pete

3 Replies

AD Administrator Syncfusion Team February 22, 2006 10:31 AM UTC

Hi Pete, To unfreeze the row header, you could try hiding the Row header and set the CellType of the first column ( which is scrollable ) to "RowHeader" and make its look and feel similar to Row header. Here is a sample project And regarding the issue ''include the row headers..''. Please provide us some more details. As we can able to include the row headers, kindly refer to the above sample for details. Best regards, Madhan.


AD Administrator Syncfusion Team March 7, 2006 08:27 PM UTC

Sorry for the delay in response, I got distracted from the issue. In the example I originally provided: Rectangle rect = rid.ViewLayout.RangeInfoToRectangle(range, true, GridCellSizeKind.ActualSize); If range is a row (GridRangeInfo.Row(4), for example), the rectangle returned has a left side at the left side of the first data cell, not 0 (left side of row header, as I would expect). Pete


AD Administrator Syncfusion Team March 7, 2006 11:29 PM UTC

Pete, try calling range = range.ExpandRange(0, 0, grid.RowCount, grid.ColCount) before passing it to RangeInfoToRectangle. Stefan >Sorry for the delay in response, I got distracted from the issue. > >In the example I originally provided: > >Rectangle rect = rid.ViewLayout.RangeInfoToRectangle(range, true, GridCellSizeKind.ActualSize); > >If range is a row (GridRangeInfo.Row(4), for example), the rectangle returned has a left side at the left side of the first data cell, not 0 (left side of row header, as I would expect). > >Pete

Loader.
Live Chat Icon For mobile
Up arrow icon