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
335
Display Null instead of Zero in UltraComboEditor in a grid
posted

Hi

I have a grid with the source of a data table. One of the columns is an integer, unfortunately the data in the database has both zero and null instead of just one or the other. What this means is that I think the grid is happy to bring through the zero but the ultra combo (or value list as I tried that also) does not have a zero. It then displays a 0 in the grid, instead of a blank which is does do when the value in the database is Null.

I want to either update the field in the ultragrid so that if it is zero then display NULL, it should not update the underlying data source but just change the display to blank. Alternatively, do it in the ultracomboeditor.

I did find an item in the forums but the links pointed to a dead end, I think it may need a custom formatter but not sure if that is on the grid or the combo. 

Here is a screenshot:

The top row has NULL in the database and the second row has 0 in the database.

The project I am doing is switching the UI from MS Access to Dot Net and I don't want to be having to update tables even though the very easiest fix would be to set any zeros to null in the database.

Thanks

Paul

Parents Reply Children