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

RectangleTo...

How could I get the location of the currently selected cell? I need to display a form next to the currently selected cell. I tried frmMyNewForm.Location = myGrid.RectangleToScreen(myGrid.RangeInfoToRectangle(myGrid.CurrentCell.RangeInfo)).Location but thats not it...

4 Replies

AD Administrator Syncfusion Team June 30, 2005 10:17 AM

Does the form and the grid have the same parent? The Location property is in the parent''s coordinate system, so you may have to call grid.RectangleToScreen and then form.Parent.RectangleToClient to get things to match.


MC Martin Cyr July 4, 2005 08:13 AM

MDI Form | --- Grid on the --- Grid on the form | --- Grid in the grid | --- Cell in the grid How can I get the cell in the grid


MC Martin Cyr July 4, 2005 08:16 AM

Here''s my hierarchy. MDI Form | --- MDI Child form | --- Grid on the form | --- Grid in the grid | --- Cell in the grid | --- New form How do I get the location of the "Cell in the grid" so that I can position the "New form" at the right coordinates?


AD Administrator Syncfusion Team July 4, 2005 08:20 AM

You need to make sure the new form has form.StartPosition = manual. Then you set its Location property in screen coordinates.

Loader.
Live Chat Icon For mobile
Up arrow icon