Skip to content

Replies

0
Marcus Turnbull
Marcus Turnbull answered on Feb 21, 2014 5:16 AM

Thanks rayc1234!

We were having the same issue though our error was to do with converting Decimal to Double – even though we had the field's datatype set to System.Double.  Only happened when adding a row where a non-integer number was entered.

Even though the column was defined as…

<ig:BoundDataField DataFieldName="UserAmount" Key="UserAmount" Width="70px" DataFormatString="{0:C0}" DataType="System.Double">

…we still needed to add this to the RowAdding event.

            object x = e.Values["UserAmount"];
            if (x is System.Decimal)
            {
                e.Values["UserAmount"] = Convert.ToDouble(x);
            }

Probably a bug so I will submit to IG when I have a chance to build a sample project.