X Y position of Current Cell

Hi Guys, I have a need to get the current XY position of a selected cell. I then need to draw a line outside of the grid to the selected cell. I have the drawing part done but I am using the XY Position of the mouse when the cell has been selected. I was wondering if there was a way to get the XY position of the cell. Regards, Chris Wescott

2 Replies

CW Chris Wescott June 12, 2006 04:44 PM UTC

I forgot, I am using a GGC with a P-C Relationship. >Hi Guys, > I have a need to get the current XY position of a selected cell. I then need to draw a line outside of the grid to the selected cell. I have the drawing part done but I am using the XY Position of the mouse when the cell has been selected. I was wondering if there was a way to get the XY position of the cell. > >Regards, > >Chris Wescott


AD Administrator Syncfusion Team June 13, 2006 03:53 AM UTC

Hi Chris, Try this code to get the selected cell bounds in a grouping grid. Here is a code snippet. GridCellRendererBase cr = this.gridGroupingControl1.TableControl.GetCellRenderer(selectedRowIndex,selectedColIndex); if(cr != null) { Rectangle cellrect = cr.GetCellBoundsCore(selectedRowIndex,selectedColIndex); Console.WriteLine( "X : " + cellrect.X + "Y :" +cellrect.Y); } Let me know if this helps. Best Regards, Haneef

Loader.
Up arrow icon