The snippet gives you the coordinates of the cell that is clicked on.
But lets assume that we have a 2 row headers, the outer one (lets say "A") spanning 2 cells, and the inner ones(lets say "B" and "C") each spanning 1 cell. If I click on "B", I would like to know what are the coordinates of "A". I need to know the range at the immediate higher level to the cell that is clicked on. Is there any way that this can be done. Also is it possible to associate any kind of an object with a header cell ?
Thanks,
>Here is a snippet that should give you the top-left cell of a covered range if the mouse is over any part of the coveredrange.
>
>
>Point pt = this.gridControl1.PointToClient(Control.MousePosition);
>int row, col;
>if(this.gridControl1.PointToRowCol(pt, out row, out col, -1))
>{
> GridRangeInfo range = this.gridControl1.CoveredRanges.FindRange(row, col);
> if(!range.IsEmpty)
> {
> //range.Top and range.Left hold the top corner of covered range of teh click....
> }
>}
>