Hi I have windows form with a Combo filled with 3 options where their values are Guid's and that has a DataBinding to a selected object.
EmployerMemberDefault item = EmployerMemberDefault();
item.GroupUid = Guid.Empty;
cbGroupEmployer.DataBindings.Clear();
cbGroupEmployer.DataBindings.Add("Value", item, "GroupUid");
When I create a new object the property that is databinded to the combo is set to Guid.Empty. If I compile and run, when I create that new object I see "00000000-0000-0000-0000-000000000000" in the combo. Is there any way I can see empty text in the combo instead of the Guid.Empty value?
Thanks.
Guid.Emptyis a guid whose value is all zeros. When youToString()this (which is what happens when it shows in the combo), you get what you have. You need to deal with this value specifically if you want it to display as an empty string. - adrianbanks