If somebody like the post and its helpful in your work then, add comments.

Tuesday, January 6, 2009

To set Decimal value in Text Box with Decimal Type in InfoPath

Use this code for setting the value in the Decimal type text box in InfoPath

XPathNavigator XMLDom = MainDataSource.CreateNavigator();
//Text Box Xpath
XPathNavigator XMLValue = XMLDom.SelectSingleNode("/my:myFields/my:DecimalValue", NamespaceManager);

if (XMLValue.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
{
XMLValue.DeleteSelf();
}
XMLValue.SetValue("10.00");//Set the value
XMLDom=null;
XMLValue = null;

No comments:

Post a Comment