ads

Tuesday, July 31, 2012

InfoPath delete first row in repeating table via code

The problem:

When you add a new row into a repeating table using code the first line remains blank




The solution:

            XPathNavigator domNav = MainDataSource.CreateNavigator();
            XPathNavigator itemNav = domNav.SelectSingleNode(
           "path to reapeting table[1]",
           NamespaceManager);

            // Delete the row
            if (itemNav != null)
                itemNav.DeleteSelf();

     

Do you like this post?
Buy me a cup of coffe to show your appreciation!

1 comment: