Użytkownik John napisał: > Hi, > Working with an interesting issue. I have a table (this is not my table) that > contains a legal null value for a field ("product_category") and does not > have a key (just text ). When I display the table in a grid all is fine with > the null value because the grid displays '<None>' as I would have expected. > > I also have a dropdown for the same field that needs to allow a null > or '<None>' for the choices (ValueMode = string because there is no key). I > manually add the string '<None>' to the Choices. However, when I select the > records on the grid that contain null values, the dropdown does not move to > the related '<None>'. Selecting a record that does not contain a Null (IOW's > a string for the value) the dropdown selection follows correctly. I can't > add a null value to a Choices items. So I'm looking for suggestions. >
Hi, Did you try: ValueMode = "Key" Choices = ["<None>", "Foo"] Keys = [None, "Foo"] Just repeat keys same as choices, e.g. set Keys list and next run: for key in Keys: Choices.append(str(key)) -- Regards Jacek Kałucki _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/4b863fe7.80...@rz.onet.pl