Welcome Guest Search | Active Topics | Sign In | Register

Grid column mapped to decimal db column Options
Bill Black
Posted: Monday, June 25, 2012 5:42:24 PM
Rank: Newbie
Groups: Member

Joined: 6/21/2012
Posts: 5
I am really confused about how the grid handles database columns. I have bound a database column of type decimal to a grid column. The DataType in the grid column definition is Float. When I try to retrieve the value of the grid cell on the server-side after editing, the value can be many different types.
1. If the db column had a value not null, the grid cell value is decimal.
2. If the db column had a null value, the grid cell value is type double.
3. If the user edited the value and left it blank, the grid cell value is an empty string.
4. If the record is a newly added grid item, and the cell was not edited and is empty, the grid cell value is type object value null.

All these different scenarios require different handling in the server-side code. What's wrong with making the grid cell value a type decimal object, just like it was originally bound?

Any guidance is appreciated.
eo_support
Posted: Monday, June 25, 2012 11:26:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

This appears to be an issue. We will look into it and get back to you as soon as possible.

Thanks!
eo_support
Posted: Thursday, June 28, 2012 2:58:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We have posted a new build that should fix this problem. Please see your private message for the download location.

The new build works this way:

1. If the original value is DbNull and user has not changed it, then the cell value stays as DbNull;
2. If user has edited the cell, then the cell value is decimal. If user enters an empty string, then the value will be 0;
3. If user has added a new item but did not edit that column, then the cell value will be null. This allows you to tell whether user has edited that cell or not;

Please feel free to let us know if you have any more questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.