I've built an InfoPath form that queries WMI data and displays it in the form so that we can submit the info to a SharePoint list.
I'm putting on the final touches and am having problems with one small section. When i query the RAM, i have it display the information into a repeating table. The problem is when i create the repeating table for some reason it duplicates the first row. I found an article on how to remove the first row (http://www.bizsupportonline.net/infopath2007/programmatically-delete-first-row-repeating-table-infopath.htm)
I use this same bit of code to remove the first row from another section and it works just fine, but for some reason when i do this very same thing it deletes the first 2 rows. I can't figure out why it works fine in one section but not in the other section, i copied and pasted the same bit of code so it should work the same. If someone could help me figure out what's going on here i'd appreciate it.
code sample:
using
namespace
{
ManagementObjectSearcher
public
EventManager.FormEvents.Loading +=
}
xnMyForm.SelectSingleNode(
.SetValue(slot);
.SetValue(capacity);
.SetValue(speed);
counter++;
AddItemMemory(slot, capacity, speed);
DeleteFirstEmptyItemMemory();
NamespaceManager.LookupNamespace(
node.InnerText = slot;
field = doc.CreateElement(
node = group.AppendChild(field);
node.InnerText = capacity;
node.InnerText = speed;
doc.AppendChild(group);
MainDataSource.CreateNavigator().SelectSingleNode(
NamespaceManager).AppendChild(doc.DocumentElement.CreateNavigator());
NamespaceManager);
itemNav.DeleteSelf();