Issue with nulls in database

Posts   
 
    
tkelley66
User
Posts: 16
Joined: 16-Apr-2013
# Posted on: 21-Feb-2018 20:28:05   

VS2017 c# project. .NET 4.5.2 Windows forms

When I try to bind a control (Infragistics) to an entity, I get an error if the field is null.

The error I get is: Cannot format the value to the desired type

The control is bound like this: txtMaleTeamColors.DataBindings.Add("Text", _org.School, "MaleColors");

This is a project we have upgraded from v1 to v5.3.

Is there a way to have llblgen return a specific value if the column is null?

tkelley66
User
Posts: 16
Joined: 16-Apr-2013
# Posted on: 21-Feb-2018 22:25:09   

Changing the binding to:

txtMaleTeamColors.DataBindings.Add("Text", _org.School, "MaleColors",true);

seems to have fixed it? Not sure what the formatting option is about.