This is a migrated thread and some comments may be shown as answers.

Custom Field Editor combo with checkboxes

1 Answer 60 Views
Filter
This is a migrated thread and some comments may be shown as answers.
David Gregory
Top achievements
Rank 1
David Gregory asked on 20 Mar 2012, 02:38 PM
Hello,

I'm attempting to create a custom field editor with a combo box with checkboxes. The problem I'm having is that only a single value is being extracted by RadFilterSqlQueryProvider.

When I walk through the code of the custom editor, the ExtractValues() method gets all the checked items. However, the SetEditorValues() method only passes in a single value.

To implement this, just use the code examples provided by Telerik and set CheckBoxes = true on the RadComboBox. Modify the ExtractValues() method to loop through the CheckedItems collection and add to the array. Then loop through the array in SetEditorValues();

Also, I am not using the Apply button I use FireApplyCommand() on PostBack. Plus, it seems that I have to use the RecreateControl() method on the RadFilter. Otherwise, I don't get any values back.

Any help would be appreciated.

Blair

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 23 Mar 2012, 04:10 PM
Hi Blair,

RadFilter's idea is slightly different from that of building this kind of custom filter scenarios. A single field editor is expected to produce a single filter expression with one of the generic filter functions. When you want to build more complex expressions you add more field editors, each adding up a part of the final result.
If you need to offer this kind of UI, I would advise you to manually build a filter expression and use the combo with checkboxes separately, without integrating it with RadFilter.

Greetings,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Filter
Asked by
David Gregory
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or