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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to find the cell bounds

Thread ID:

Created:

Updated:

Platform:

Replies:

54144 Jan 3,2007 05:58 AM UTC Jan 3,2007 09:02 AM UTC Windows Forms 1
loading
Tags: GridControl
Surendra Mohan
Asked On January 3, 2007 05:58 AM UTC

Hello,

We are developing automation testing script for our application which uses Syncfusion essential grid version 3.302.0.0.

Our tool(Test Complete) is not able to recognize this grid. so we need some properties or methods info. so that we can develop test scripts.

1. If i double click on the header cell it will either expand or collapse, Is there any method to find whether this is expanded/ collapsed.

2. If i double click on any cell(except header cell) 'X' mark will come there. if already 'X' mark is there means if we double click on that mark will go off.
To double click, i need to get the bounds of that cell based on row and column index ( or suggest if there is any other way)
As well i want find whether that cell is checked(marked) or not.

Thanks in advance.

Cheers
Surendra Mohan

Essential grid.zip

Administrator [Syncfusion]
Replied On January 3, 2007 09:02 AM UTC

Hi Surendra,

We had worked with TestComplete earlier and there were no issue in recognization of the grids, may be some customizations need a work around.

1. Expand and collapse when double click on the header cell is not a default behavior, probably the column or row is either hidden on double click or height/width reduced to 0. This can be known from either of the code below.

if(this.gridControl1.ColWidths[4] == 0) // or
if(this.gridControl1.Cols.Hidden[e.ColIndex]) // or
if(this.gridControl1.HideCols[e.ColIndex])

2. Check the cell value, to see if that is updated. CellValue can be reached this way as an example please refer to the code.

form = Sys["Process"]("MaskEditCells")["WinFormsObject"]("Form1");
grid = w3["WinFormsObject"]("panel1")["WinFormsObject"]("splitterControl1")["WinFormsObject"]("gridControl1");
if(grid["Item"](row, col)["CellValue"] == "X")
// ....

RaiseCellDoubleClick can be considered instead of knowing the bounds. This is an overloaded function, so please check the right function to be used in the TestComplete environment, usually a suffix of underscore and a number is used to identify.

grid.RaiseCellDoubleClick(row, col, null);

The bounds for a given cell can be known from RangeInfoToRectangle
Rectangle rect = this.gridControl1.RangeInfoToRectangle(Syncfusion.Windows.Forms.Grid.GridRangeInfo.Cell(4, 4));

RaiseCellDoubleClik can also be used on header to perform the task differently. Please also refer to the sample application.

Best regards,
Stanley

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;