Can't iterate through a combo box to get the values
Posted: Fri Mar 02, 2012 1:52 am
Hi,
I'm trying to iterate through a combo box to get the values in it. I can usually do this with no problem using the following code:
But in this situation I can't get any values. Each time debugging the value of row is null. If I do
The report states that there are 2.
I've checked with the developer of the program and found out that the combo boxes are regular winform comboboxs. Any suggestions on where I could be going wrong, or some sample code that would work?
I'm trying to iterate through a combo box to get the values in it. I can usually do this with no problem using the following code:
Code: Select all
foreach(Ranorex.Row row in cbxMarket.FindChildren<Ranorex.Row>())
{
foreach(Ranorex.Cell cell in row.FindChildren<Ranorex.Cell>())
{
Report.Info(cell.Text);
}
}
Code: Select all
Report.Info(cbxMarket.Children.Count.ToString());
I've checked with the developer of the program and found out that the combo boxes are regular winform comboboxs. Any suggestions on where I could be going wrong, or some sample code that would work?