Ed Leafe wrote: > On Jan 10, 2010, at 4:55 AM, sim wrote: > >>> If you bind a table column to any list control, all of the values in >>> the column must be present in the control's Choices property > >> That's what I understood from the code. I agree with this functionality >> when the ValueMode is Key or Position, but when value mode is String >> that means that you don't really care about the key and what you are >> saving in your database is the string value. As it is a combobox and not >> just a dropdown, its nature is to accept values that aren't in the list. > > Sorry, but that simply isn't the way that any list-based control works. > If you have a list whose Choices are "A", "B" and "C", and you tell it to set > its Value to "D", you will (and should) get an error. > > The solution I proposed (a text box with a dropdown with common > defaults) is really what you need. A textbox isn't a list-based control, so > you can set it to anything you want. > >> I am going to override the functionality, the question is should I do it >> in a derived class, or would you agree that this is a bug and include it >> in dabo if I fix the original file? > > > It's not a bug. It's working exactly the way it should. You should > either populate the Choices will all existing values first, or not bind to a > list-based control in the first place.
A combo box *is* a hybrid text box/list control. I can see the point of perhaps making a property to control this behavior. Paul _______________________________________________ Post Messages to: [email protected] 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/[email protected]
