Working With Developer Express QuantumGrid - Getting Focused Row and Cell

When testing applications that use the QuantumGrid control by Developer Express, you may need to know what row and cell is currently focused. To do this, create a script that will perform the following actions:

  • Obtain the currently focused view (to access the focused row, you need to know what view is focused). To do this, use the FocusedView property of the grid object. It returns the view object that corresponds to the focused grid view.
  • Use the ViewData.Controller.FocusedRowIndex property of the view object to get the index of the focused row among other rows.
  • To obtain the index of the focused column, use the view object’s ViewData.Controller.FocusedColumnIndex property.

Note that in order for TestComplete to be able to access these properties, the tested application must be compiled as an Open Application with debug information.

The following code demonstrates how you can use the described properties to obtain the value of the focused cell:


Close

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading