Combobox and Nullable fields

Posts   
 
    
hneste
User
Posts: 3
Joined: 17-Aug-2006
# Posted on: 17-Aug-2006 22:56:13   

I have a control that has a look up lists of status values. It is bound to a ProjectEntity that has a foreign key value for StatusId. The problem is that status can be null. The issue I'm running into is that the webform goes into edit mode displaying the combobox but I get an error message that states selected value does not exist in the dropdown box. How can I bind this null value to a lookup?

Thanks

Steve

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 18-Aug-2006 07:38:54   

I think you should manually add an Item to the dropdownlist (eg. "--N/A--" with a value of 0). And you select this item in case of null value.