[Collapse]TestComplete/viewarticle/63445/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Expand]Getting Started Tutorial/viewarticle/56246/
 [Expand]Using TestComplete/viewarticle/57875/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Collapse]Working With Application Objects and Controls/viewarticle/55815/
  [Expand]General Information/viewarticle/63362/
  [Expand]Common Tasks/viewarticle/56267/
  [Expand]Simulating User Actions/viewarticle/56262/
  [Collapse]Object-Specific Tasks/viewarticle/63386/
   [Expand]Working With Standard Windows Controls/viewarticle/61593/
   [Expand]Working With Android Controls/viewarticle/58141/
   [Expand]Working With iOS Controls/viewarticle/63575/
   [Collapse]Working With Grids/viewarticle/55282/
     Working With Grids - Basic Concepts/viewarticle/61980/
     Common Operations for Grids/viewarticle/62006/
    [Expand]Borland TDBGrid/viewarticle/63214/
    [Expand]Developer Express QuantumGrid/viewarticle/60614/
    [Expand]Developer Express XtraGrid/viewarticle/60655/
    [Expand]Microsoft DataGrid/viewarticle/63259/
    [Expand]Microsoft DataGridView/viewarticle/63250/
    [Expand]Microsoft PropertyGrid/viewarticle/63261/
    [Expand]Infragistics UltraWebGrid/viewarticle/63309/
    [Expand]Infragistics WinGrid/viewarticle/63241/
    [Expand]Java Swing JTable/viewarticle/63315/
    [Collapse]Syncfusion GridControl/viewarticle/63291/
      Working With Syncfusion GridControl - Overview/viewarticle/63291/
      Accessing Rows, Columns and Cells in Syncfusion GridControl/viewarticle/62119/
      Searching for Records in Syncfusion GridControl/viewarticle/63293/
      Selecting Cells in Syncfusion GridControl/viewarticle/63294/
      Activating and Closing In-place Editors in Syncfusion GridControl/viewarticle/63295/
      Obtaining and Setting Cell Values in Syncfusion GridControl/viewarticle/63290/
      Working With Specific Cells in Syncfusion GridControl/viewarticle/63297/
      Copying and Pasting Cell Values in Syncfusion GridControl/viewarticle/63296/
      Selecting Multiple Rows in Syncfusion GridControl/viewarticle/63299/
      Obtaining Selected Rows in Syncfusion GridControl/viewarticle/63298/
      Iterating Through Rows in Syncfusion GridControl/viewarticle/63292/
      Sorting Data in Syncfusion GridControl/viewarticle/63300/
    [Expand]Syncfusion GridDataBoundGrid/viewarticle/63268/
    [Expand]Syncfusion GridGroupingControl/viewarticle/63283/
    Working With Open File and Save File Dialogs/viewarticle/55492/
    Testing Modal Windows/viewarticle/55107/
    Working With Ribbon Command Bars in Windows 7 Applications/viewarticle/63385/
    Working With XtraBars Controls/viewarticle/60549/
    Working With .NET ErrorProvider/viewarticle/62759/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Expand]References/viewarticle/57878/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete Licensing Guide/viewarticle/63451/
Updated: 3/11/2014 Applies To: TestComplete 10 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Working With Syncfusion GridControl Select language for code samples Select language for code samples

Iterating Through Rows in Syncfusion GridControl

Iterating through grid rows means accessing rows is a series, one by one. You may need to iterate through GridControl rows if you need to locate a particular row in the grid or perform the same set of operations on each row.

You can iterate through the grid rows by organizing a loop. Since the numeration of grid rows and columns is zero-based, the index of the first grid row (column) is 0, and the index of the last row (column) is returned by the Model.RowCount (Model.ColCount) property. On each loop iteration, you can perform the desired actions over the current row. For example, you can obtain or modify cell values.

Note that the first rows and columns represent grid headers and do not contain actual data. To determine the indexes of the topmost row and leftmost column that contain data rows, you can use the grid’s GridCellsRange.Top and GridCellsRange.Left properties. The GridCellsRange.Bottom and GridCellsRange.Right properties return the indexes of the last data row and column. For more information on addressing GridControl rows and columns, see Accessing Rows, Columns and Cells in Syncfusion GridControl.

Note: In order for TestComplete to access these properties, the .NET Application Support plug-in must be installed and enabled.

The following example demonstrates how to process GridControl rows in a loop. It iterates through the grid rows, saves the data to an XML file and adds a link to this file in the test log.

Show Example

See also
Working With Syncfusion GridControl - Overview | Accessing Rows, Columns and Cells in Syncfusion GridControl | Obtaining and Setting Cell Values in Syncfusion GridControl | Searching for Records in Syncfusion GridControl


© 2014 SmartBear Software. All rights reserved.
Email Send feedback on this document