RangeInfoToRectangle method for GGC?

Hi.

Is there a way to get client rectangle coordinates for a cell in GGC as it happens for the regular grid with method RangeInfoToRectangle?

Thanks.

1 Reply

AR Arulpriya Ramalingam Syncfusion Team January 3, 2018 12:04 PM UTC

Hi Paulo,  
  
Thanks for contacting Syncfusion support.  
  
In order to get the rectangle coordinates of a cell, the TableControl.RangeInfoToRectangle() method can be used. And the rectangle coordinated will be calculated based on the provide row/column index of the cell. In the provided sample, the ClientRectangle ofCurrentCell has been retrieved. Please refer to the below code and KB,  
  
Code example  
  
private void button1_Click(object sender, EventArgs e)  
{  
    //Get the CurrentCell  
    GridCurrentCell currentCell = this.gridGroupingControl1.TableControl.CurrentCell;  
    if (currentCell != null)  
    {  
        //Retrieve the client rectangle   
        Rectangle clientRectangle =this.gridGroupingControl1.TableControl.RangeInfoToRectangle(GridRangeInfo.Cell(currentCell.RowIndex, currentCell.ColIndex));  
        MessageBox.Show("The client rectangle of the cell {R" + currentCell.RowIndex + ":C" + currentCell.ColIndex + "} is " + clientRectangle);  
    }  
}  
  
  
Please refer to the below KB to get the rectangle coordinates on mouse hovering,  
  
  
Please let us know, if you have any other queries.  
  
Regards,  
Arulpriya  


Loader.
Up arrow icon