We are testing an application that uses the Telerik.Windows.Controls.RadGridView registers.
I want to retrieve the values in the column headers. Presumably I iterate through the gridview in some way getting the values. I have tried a number of different methods with no luck.
In the tree I can see that there is a GridViewHeaderRow and within that a Selective Scrolling Grid. Then below that is a DataCellsPresenter wiht a number of Grid View Cells in a panel - the text value of hte headers are within these GridViewCells.
I am struggling to work on the correct object in order to get the column header texts. The objects I have attempted to use throw an error in the foreach statement to say that getenumerator has not been exposed.
Has anyone successfully iterated through a selective scrolling grid?
thanks
I want to retrieve the values in the column headers. Presumably I iterate through the gridview in some way getting the values. I have tried a number of different methods with no luck.
In the tree I can see that there is a GridViewHeaderRow and within that a Selective Scrolling Grid. Then below that is a DataCellsPresenter wiht a number of Grid View Cells in a panel - the text value of hte headers are within these GridViewCells.
I am struggling to work on the correct object in order to get the column header texts. The objects I have attempted to use throw an error in the foreach statement to say that getenumerator has not been exposed.
Has anyone successfully iterated through a selective scrolling grid?
thanks
[CodedStep(
@"readHeaders")]
public void requisitionScreen_CodedStep()
{
// read through the grid
WpfApplication app = Manager.ActiveApplication;
Assert.IsNotNull(app);
Telerik.Windows.Controls.GridView.GridView grid = app.MainWindow.Find.ByName<Telerik.Windows.Controls.GridView.GridView>(
"GridView");
Telerik.Windows.Controls.GridViewHeaderRow row = grid.HeaderRow;
int index=row.HeaderCells.Count;
Log.WriteLine(
"count "+index.ToString());
for (int i=0;i<index;i++){
row.HeaderCells[i].ToString();
}