Completed
Last Updated: 14 Sep 2015 11:20 by ADMIN
ADMIN
Ralitsa
Created on: 17 Aug 2015 12:11
Category:
Type: Bug Report
0
FIX. RadCheckedDropDownList - the items can not be checked if the Text property is set in the handler of the ItemCheckedChanged event
To reproduce: 
1. Add RadCheckedDropDownList with few items 
2. Subscribe to the ItemCheckedChanged event
3. In handler of event add the following code snippet: 
void radCheckedDropDownList1_ItemCheckedChanged(object sender, RadCheckedListDataItemEventArgs e)
{
    this.radCheckedDropDownList1.Text = string.Format("Count {0}", radCheckedDropDownList1.CheckedItems.Count.ToString());
}
4. Open the drop down popup and you will see that can not check/uncheck any item. 


Workaround: 
1. Subscribe to the TextChanged event of AutoCompleteEditableAreaElement and set the Text property: 

this.radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.TextChanged += AutoCompleteTextBox_TextChanged;
void AutoCompleteTextBox_TextChanged(object sender, EventArgs e)
{
    this.radCheckedDropDownList1.Text = string.Format("Count {0}", radCheckedDropDownList1.CheckedItems.Count.ToString());
}
1 comment
ADMIN
Ivan Petrov
Posted on: 09 Sep 2015 10:54
The reason for the behavior is that when the text of the editor is changed, the checked state of the items in the drop down is synched with the text. In this case the text is changed to something that does not match any of the items in the drop down hence all are unchecked. There is a property wich controls whether this synchronization should be performed or not. The property is called SyncSelectionWithText. This property at the moment is not respected and changing its value does not affect the behavior. We will address this and from our next release (Q3 2015) the property will be respected and the above code should work one the property is set to false.