Kendo UI ComboBox DataSource RequestEnd event -


i have set of comboboxes items come same datasource.read event. in cases, want filter items. combobox looks this:

@(html.kendo().combobox()     .htmlattributes(new { style = "font-size:10px; background-color: #f4f4f4;" })     .name(string.format( "{0}{1}", p, f[0] ) )     .placeholder("choose value...")     .datatextfield("name")     .datavaluefield("value")     .datasource( source =>      {         source.read( read => read.action( "mymethod", "mycontroller", new { _type = f[2] } ) )             .events( e => e.requestend( f[0] == "f1" && p != "p1" ? "setfilter" : "nofilter" ) );     } ) ) 

the variables, p, , f[x] strings couple of foreach loops running. run through loops, intention leave datasources alone except in cases f[0] == "f1" , p != "p1".

my 2 functions this:

function nofilter() { }  function setfilter( e ) {     var $filter = new array();     $filter.push({ field: "name", operator: "startswith", value: "o" });     e.sender.filter({ logic: "or", filters: $filter }); } 

altogether, have twelve combo boxes loading, of 2 fit exceptions. when editor comes up, combo boxes briefly show wait indicators while load. works well, except wait indicators 2 exceptions never go away, though filters applied wish.

what missing leaving wait indicators running?

seems recursively calling server since setting filter after reading data. setting filter datasource call read method filter again. means call requestend method again (never ending).

instead doing way try set filter after creation of grid.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -