Programmatically add a row ON TOP to a repeating table using an XmlWriter object - InfoPath Dev
in

InfoPath Dev

Programmatically add a row ON TOP to a repeating table using an XmlWriter object

Last post 05-14-2009 02:52 AM by pbakker_67. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-14-2009 02:52 AM

    Programmatically add a row ON TOP to a repeating table using an XmlWriter object

    Hi, I'm using the following code to add a row to a repeating table. This works fine, however, i want to add the new row on top stead of bottom. How can i archieve this?

                string myNamespace = NamespaceManager.LookupNamespace("my");
                using (XmlWriter writer = MainDataSource.CreateNavigator().SelectSingleNode(
                "/my:myFields/my:group1", NamespaceManager).AppendChild())
                {
                    writer.WriteStartElement("group2", myNamespace);
                    writer.WriteElementString("field1", myNamespace, "Cell 1");
                    writer.WriteElementString("field2", myNamespace, "Cell 2");
                    writer.WriteElementString("field3", myNamespace, "Cell 3");
                    writer.WriteEndElement();
                    writer.Close();
                }

    Thanks, Paul

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.