The scenario is completely different here. I have a repeating table which is having two columns, one column is having a drop down list box and the other contains a button called "Add row". I have three values in that drop down list box, one is "--Select--" , second one is "A" and the final one if "B". I did a validation for the button like, when ever the user hit the add row button in the first row with out selecting A or B, it should show a pop up message. This is working fine for the first row, suppose if select "A" in the first row and hit "Add Row", it's working fine. Now i am in the second line where i did not select any value from the drop down. It should the take "--Select--" from the field as value, but it was taking "A" from the first row. It was always reading the value from the first row.
Here is my code for this,
XPathNavigator xCheck = MainDataSource.CreateNavigator();
XPathNodeIterator xNode = xCheck.Select("/dfs:myFields/dfs:queryFields/tns:method/structure/item", NamespaceManager);
string r = xNode.Current.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:method1/structure/item/fields1", NamespaceManager).ToString();
if ((xNode.Current.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:method1/structure/item/field1", NamespaceManager)).ToString() != "S")
{
}
In the above code, "S" means --select-- , and "item" is the repeating node, and string "r" is used to find which value is coming.