Friday, 14 September 2012

Getting Repeater Section current row in InfoPath 2010 using code.

Using following code:-

-Take one repeater section under section add one fields to see the item count or  current row value.
-Then on fire repeater section event change binding.


XPathNavigator root = this.CreateNavigator();
XPathNodeIterator nodes = 
   root.Select("/my:myFields/my:group1/my:field1", NamespaceManager);
int myInt = 1;
while (nodes.MoveNext())
{
   nodes.Current.SetValue(myInt.ToString());
   myInt = myInt + 1;
}

No comments:

Post a Comment