I have reviewed Creating Custom Field Editors and successfully built a RadFilter custom editor with a RadComboBox that returns a single value.
Now I would like to take advantage of the RadComboBox.CheckBoxes property in a new RadFilter custom editor. I call this RadFilterDropDownCheckBoxEditor. I can see during debug that SetEditorValues is only returning the first selected value in the RadComboBox.CheckedItems collection:
This implies that the RadFilter is retaining only one value for this custom editor. I would like the RadFilter to support multiple values for a custom editor.
On the client side, the RadFilter generates *_RadFilterDropDownCheckBoxEditorCombo_Input and a corresponding, hidden field *_RadFilterDropDownCheckBoxEditorCombo_ClientState. The _ClientState value holds a "serialized" JSON object with a checkedIndices array. I can literally see this array correctly tracking the multiple values selected in the custom editor's RadComboBox. However, I assert that this state is not correctly persisted by the RadFilter.SaveSettings method.
Can the good people at Telerik show me some sample code for a custom RadFilter editor using with RadComboBox.CheckBoxes == true?
Now I would like to take advantage of the RadComboBox.CheckBoxes property in a new RadFilter custom editor. I call this RadFilterDropDownCheckBoxEditor. I can see during debug that SetEditorValues is only returning the first selected value in the RadComboBox.CheckedItems collection:
public override void SetEditorValues(ArrayList values) { if (values != null && values.Count > 0) { foreach (var item in values) { if (item == null) return; var comboItem = _combo.FindItemByValue(item.ToString()); if (comboItem != null) comboItem.Checked = true; } } }
This implies that the RadFilter is retaining only one value for this custom editor. I would like the RadFilter to support multiple values for a custom editor.
On the client side, the RadFilter generates *_RadFilterDropDownCheckBoxEditorCombo_Input and a corresponding, hidden field *_RadFilterDropDownCheckBoxEditorCombo_ClientState. The _ClientState value holds a "serialized" JSON object with a checkedIndices array. I can literally see this array correctly tracking the multiple values selected in the custom editor's RadComboBox. However, I assert that this state is not correctly persisted by the RadFilter.SaveSettings method.
Can the good people at Telerik show me some sample code for a custom RadFilter editor using with RadComboBox.CheckBoxes == true?