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

Secondary filter input binding in dropdown

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Charlie
Top achievements
Rank 1
Charlie asked on 29 Jun 2015, 01:04 PM

Hello, I have a drop down filter with both checkbox and the default filter. I've been looking at the documentations on how to bind the inputs below with text and I haven't been success in binding all of them. The goal of the default filter is the work and remember the previous settings and text that have been filtered with. I tried to create by own observable on the two input fields in the default filter with unique ids with this code:

var levelOneFilterText = "";
var levelTwoFilterText = "";
var viewModelLevelOne = kendo.observable({
  levelOneFilterText: levelOneFilterText,
});
var viewModelLevelTwo = kendo.observable({
  levelTwoFilterText: levelTwoFilterText
});
 
var defaultFilterInputs =helpTextElement.nextUntil(":has(.k-button)")
 
defaultFilterInputs[1].dataset['bind'] = "text:levelOneFilterText"; // remove a new binding for filters
defaultFilterInputs[1].id = "charlie-filter-1-"+id; // custom filter
defaultFilterInputs[4].dataset['bind'] = "text:levelTwoFilterText";
defaultFilterInputs[4].id = "charlie-filter-2-"+id;
 
kendo.bind($("#charlie-filter-1-"+id),viewModelLevelOne);
kendo.bind($("#charlie-filter-2-"+id),viewModelLevelTwo);
id++;

 I am able to bind one filter, but if I open another filter up, the inputs will be missing. I don't know why this is happening so I wanted to make a post here in order to ask for for advice.

 

The sample project here Dojo proj is the exact code I am using.

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 02 Jul 2015, 06:20 AM
Hello Charlie,

The behavior you described is not supported out of the box and I am afraid that implementing it requires a custom solution that is outside the scope of our support services.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Charlie
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or