Hi,
I am using UltraComboEditor with the following settings,
ultraComboEditor1.CheckedListSettings.CheckBoxStyle = CheckStyle.CheckBox;
I want to trigger an event on item's checked state change.
Is there any CheckedChanged Event for UltraComboEditor?
Thanks in advance,
Kumar
Hi Mike,
Thank you for checking.
The workaround works fine for me.
Thank you.
Bye
Dirk
Hi Dirk,
I created a small test project to try this out and I am getting the same results. It looks like the CheckState on the other items is actually changing, but the display is just not refreshing. So when you close the dropdown and re-open it, it's correct.
But this is clearly a bug. I'm going to forward this on to Infragistics Developer Support so they can get it corrected.
In the mean time, you can work around it by forcing the list to refresh:
void checkedItemList_CheckStateChanged(object sender, EditorCheckedListSettings.CheckStateChangedEventArgs e) { ValueList valueList = sender as ValueList; if (valueList == null) return; ValueListItem selectedItem = e.Item as ValueListItem; if (selectedItem == null) return; if (selectedItem.DataValue.ToString() == "Any" && selectedItem.CheckState == CheckState.Checked) { foreach (ValueListItem valueListItem in valueList.ValueListItems) { if (valueListItem != selectedItem) valueListItem.CheckState = CheckState.Unchecked; } } IUltraControlElement valueListDropDown = DropDownManager.GetCurrentDropDownControl(valueList.Owner.Control) as IUltraControlElement; if (valueListDropDown != null) valueListDropDown.MainUIElement.DirtyChildElements(true); }
I have made it according to your proposal and it works fine for the text line, but I have a issue with the update of the checkboxes in my UltraComboEditor drop down list.
I have the request that sometime it should be possible to select only one item inside the drop down list.
I have attached two pictures, maybe easier to understand :-).
Pic1:
Pic2:
First I select "Any" and "Any" is dispayed (Pic1). Than I select "Truck" and "Truck" is displayed (Pic2). OK but the selected mark is still visible in front of "Any". It should be unselected.
Inside checkedItemList_CheckStateChanged I set the state of "Any" to CheckState.Unchecked and it disappears in the text line.
I have tested inside the event "SelectionChanged" the methods Refresh(); RefreshList(); Update();but all of don't change it.
How can I update the checkbox in front of "Any" ?
I use the UltraComboEditor inside a UserControl. We have NetAdvantage 2009 Vol. 1 with NetAdvantage 2009 Vol. 1 Win Forms SR 2029 and German Vista.
Thanks Mike,
This works for me.
Regards,
Hi Kumar,
You might want to look at this thread: what item changed on valuechanged event - Infragistics Community