Getting the ComboBox to show a blank value


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have a combobox which has a BindingField that updates when a corresponding grid row is selected.  The combobox is really a dropdown (non-editable), and displays a queried list depending on other selections.  If no selection is made from the dropdown I want a blank to show.  This works okay until I select one that has a value showing in the dropdown.  After this, every blank value shows as the previous record's value instead of blank.  I think the issue is that when the record changes, and the new record has a blank field it is looking for a blank in that dropdown, but doesn't find it so it just stays on the current field.  I may be confusing the point here, but if you understand my question a solution to this problem would be great.  Thanks!
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Andria,

In your DevExpress combo you have the Value Member set to the cust_pk which is integer.  But the TopMostItem's value is empty which would make it a string.  Thus the error you are getting.  The type of value member and the type of TopMostItem have to match.  If you set the Value Member in the PopulationDataSourceSettings to cust_lname which is the value I wanted to associate with the combo box, then it will work fine.

The value member in the PopulationDataSourceSetting is the value that gets assigned to a bound value.  So in your previous posts you mentioned that the bound value is a string field called RateCode.  So your value member should be RateCode.  If you are creating custom properties such as RateCode1, the this would be your value member. 

Let me know if this answers your question.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Andria,

One other thing, instead of setting the TopMost property in the load, use the property within the property sheet.  It will work much better since it will load it into the data source with the rest of the records.  Otherwise it may not work at all depending on the order of instantiation.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
                     [quote] With Me .cboRule1Code .DataSource =...
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Andria Jensen - 19 Years Ago
Trent L. Taylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search