Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
Problem saving data from double datatype column
posted

I have a WebGrid with the following column:

<igtbl:UltraGridColumn BaseColumnName="RentAmount" AllowUpdate="Yes" Format="$ ###,###,###.##" DataType="System.Decimal">
  
<Header Caption="Rent">
      
<RowLayoutColumnInfo OriginX="4" />
   
</Header>
  
<Footer>
     
<RowLayoutColumnInfo OriginX="4" />
  
</Footer>
</igtbl:UltraGridColumn>

 When I try to Save the Changes of the web grid it will save without any problem is there are no decimal places in the value that I enter.
If I save 700.00, it will save. If I try 700.50 it will change the value of the column to False after the postback. I tried this with both System.Double and System.Decimal data types.

When I was debugging and running through the server code, it showed the value as 0 when I was looping through the grid and getting the values of the columns to update.

Any help would be appreciated.

Thanks.

 

 

 

 

 

  • 19308
    posted

    With out a repro, it's difficult to say what may be going wrong.  It sounds like a bug on the surface, but there are a couple of things that I would want to check first.  You didn't mention what your datasource looks like.  Is this a bound or unbound grid/column?  Also, when you looped through the data, did you check the .Text or the .Value property of the cell? 

  • 5
    posted

    Hi,

    I have also encoutred the same problem. If you find solution to this problem could you please share it.

    Thanks,

    Kedar.