hi
i have a ultra combo editor that is filled with a list of departments in order to create a sql query
example (ALL, dept 1, dept 2, dept n) so at run time i need to check all departments if ALL value was checked or uncheck all departments if ALL values was changed from checked to uncheck
i was trying to use the valuechange event but i dont see how to detect what item changed, any idea or sugestion to the righ way?
Thanks.
Hi,
You can do something like this:
ICheckedItemList checkedItemList = this.ultraComboEditor.Items.ValueList as ICheckedItemList;checkedItemList.CheckStateChanged += new EditorCheckedListSettings.CheckStateChangedHandler(checkedItemList_CheckStateChanged);
how would this be on vb net
do i need to import somthing in order to recognize CheckedItemList
this is what im trying to do but doesnt recognize CheckedItemList
Dim
checkedItemList As CheckedItemList = Me.cmbModel.Items.ValueList
In VB it would look something like this:
Imports Infragistics.WinImports Infragistics.Win.EditorCheckedListSettingsPublic Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim checkedItemList As ICheckedItemList = CType(Me.UltraComboEditor1.Items.ValueList, ICheckedItemList) AddHandler checkedItemList.CheckStateChanged, AddressOf Me.checkedItemList_CheckStateChanged End Sub Public Sub checkedItemList_CheckStateChanged(ByVal sender As Object, ByVal e As CheckStateChangedEventArgs) End SubEnd Class
Hi Carl,
For UltraCombo, the control itself implements ICheckedItemList:
ICheckedItemList checkedItemList = this.ultraCombo1 as ICheckedItemList;
Hi Mike
Is there an equivalent to this for the “UltraCombo” not the “UltraComboEditor” as the UltraCombo does not have the properties “Items.ValueList”?
In addition if this is a not useable on an UltraCombo, would the “UltraCombo.CheckedListSettings.CheckStateChangedHandler” be of use? If so how do I use it?
Thanks
Carl
No, empty array does not work either. Event is triggered only when end-user changes selection from the UI. We will work arround it for the moment waiting for the next release, if your developers confirm that it is indeed a bug.
That sounds like a bug to me. I will forward this thread over to Infragistics Developer Support so they can check it out.
One thing you might try as a workaround is to set the value to an empty array.
myCombo.Value = new[] { };
I'm setting the value of the UltraComboEditor programmatically.
If I do the following the CheckStateChanged is indeed triggered:
myCombo.Value = new[] { 1, 2 };
However if I set null value it isn't.
myCombo.Value = null;
Any ideas?