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
855
NA 11.2: UltraWinGrid - Column NullText
posted

I have a SQL 2005 table. One of the columns contains decimal values, sometimes the value would be null. The grid displays these decimal nulls as "0". I want the grid to display an empty cell and not "0".

I've tried the InitializeColumn and InitializeRow without success with the following code:

if (column.Key == "MyDecimalColumn")

{ column.Nullable = Nullable.Null;

column.NullText = "";}

Please assist. Thank you

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I tried this out and I do not get the behavior you describe. The grid does not replace null values with 0's for a decimal column. Null values are display as an empty string. I also tested the NullText property and it works just fine for me.

    So if you are seeing "0"s in the cell, it must be something in your code that is doing this. Are you sure your DataSource is returning null or DBNull.Value? What kind of data source are you using? Are you sure the DataType of the column is Decimal? Are you applying a Format to the column?

Children