Adding rows and problem assigning values to numeric fields in the

C

corix

Hi All,

I'm using InfoPath2007 and C#. I created a blank form then placed a number
of controls including a repeating table and a button. I coded the button so
that when clicked, a certain number of rows will be added and values assigned
automatically.
Everything runs fine when the fields in the row as string data type but if
change it to decimal because I want to format the value to show fixed 2
decimal places, I'm getting this error: "Schema validation found non-data
type errors."
Following is a portion of the code:

Row = Table.Clone();
Row.SelectSingleNode("./my:Value",
NamespaceManager).SetValue(Amount.ToString());

where Amount is of data type double.

How do I resolve this issue? Any help will be greatly appreciated.
 

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