createNode creates read only node

B

BillT

My goal is to add a new row to a secondary data source which contains a lot
of child nodes. I use createNode to create that node, then createNode to
create all of its children, then appendChild to add the children to the
parent. The new row shows up on the form, but I cannot edit it. When I
clone an existing node and add it to the secondary data source I can edit the
fields but I'm doing this code for the case when the secondary data source
contains no entries for this row. There's no rule or conditional formatting
to make this row read-only, so I'm not sure why this should be.

Thanks in advance,
Bill
 
B

BillT

A trimmed version of it is this (sorry for the formatting):
<code>
public IXMLDOMNode CreateContactNode()
{
IXMLDOMNode contactNode =
thisXDocument.DOM.createNode(DOMNodeType.NODE_ELEMENT,"ns6:ContactValue","http://www.argosys.com/Schema/SystemValue.xsd");

IXMLDOMNode firstNameNode =
thisXDocument.DOM.createNode(DOMNodeType.NODE_ELEMENT,"ns11:first_nm","http://www.argosys.com/Schema/SystemValue.xsd");
IXMLDOMNode lastNameNode =
thisXDocument.DOM.createNode(DOMNodeType.NODE_ELEMENT,"ns11:last_nm","http://www.argosys.com/Schema/SystemValue.xsd");
contactNode.appendChild(firstNameNode);
contactNode.appendChild(lastNameNode);
return contactNode;
}

public void OnClick...()
{
newNode = CreateContactNode();
IXMLDOMNode sysDetail =
newXDoc.selectSingleNode("//*[local-name()='SystemDetail']");
if(noContacts)
{
IXMLDOMNode insertNode =
sysDetail.selectSingleNode("//*[local-name()='HeadendDetail']");
sysDetail.insertBefore(newNode,insertNode);

}

HeadendDetail is the element expected After the contact values in the schema.
</code>
Hope this is illuminating.
Thanks,
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top