Can someone explain to me what's going on here...
I'm populating a grid based on a value selected in a stand alone UltraCombo. When opening the form I would like to initialize the combo with the most common selection and thus populate the grid with data.
Performing SetInitialValue automatically calls the ValueChanged event - which is great.
If I designate my ultracombo to be of style "DropDown" the following code runs fine - meaning that, in the ValueChanged event, the value has a valid value. However, if I simply change the style to "DropDownList" the ucChooseVendor.Value is null.
I had initially setup a bunch of forms with the style being DropDown (the default) but realized that the user could type text within the dropdown which I did not want - so I changed them to DropDownList style.
PS #1: Is there a way to have a DropDown style and yet prevent them from changing the list items (i.e., typeing) in the control?
PS #2: I also noticed that with the DropDown style, when I type bogus info into the combo the ucChooseVendor.Value is the value of the bogus data rather than say maybe null or -1. In other words, why now all of a sudden, does the control want to return the DisplayMember vs the ValueMember?
All-in-all, somewhat confusing behavior in my opionion.
Thanks,
Mark
private void form1_Load(object sender, EventArgs e)
{
.....other code here....
}
e)
....
DataTable dt = DataLayer.Vendors.GetGLAccountVendorItems(ucChooseVendor.Value.ToString()); // <= Value is Null here depending on style
)
mnewmister said:If I designate my ultracombo to be of style "DropDown" the following code runs fine - meaning that, in the ValueChanged event, the value has a valid value. However, if I simply change the style to "DropDownList" the ucChooseVendor.Value is null.
mnewmister said:PS #1: Is there a way to have a DropDown style and yet prevent them from changing the list items (i.e., typeing) in the control?
mnewmister said:PS #2: I also noticed that with the DropDown style, when I type bogus info into the combo the ucChooseVendor.Value is the value of the bogus data rather than say maybe null or -1. In other words, why now all of a sudden, does the control want to return the DisplayMember vs the ValueMember?
>>You should report it so that you receive a notification when the fix becomes available
Looked all over the site for where to do this...link please.
Thanks for your response Brian