M
Maury Markowitz
I have a combobox bound to a nullable varchar field in SQL Server.
Null means something specific, "use the default logic". I'd like to
have the system display "(default)" in the combobox if the value in
the db is null. I tried this:
SELECT null as [ID], '(default)' as programId UNION SELECT programId
as [ID], programId FROM tblPrograms ORDER BY programId
and then bound to column 1 and hid it. However, when you select
"(default)" the value disappears after you select it.
Am I overthinking this? Is there an easier solution?
Maury
Null means something specific, "use the default logic". I'd like to
have the system display "(default)" in the combobox if the value in
the db is null. I tried this:
SELECT null as [ID], '(default)' as programId UNION SELECT programId
as [ID], programId FROM tblPrograms ORDER BY programId
and then bound to column 1 and hid it. However, when you select
"(default)" the value disappears after you select it.
Am I overthinking this? Is there an easier solution?
Maury