izdi
#1
Hi expert,
I wanted to sort data, and according to sample I can use data.sort as follows:
dhx.extend($$("searchChannel").data, dhx.GroupStore);
$$("searchChannel").sync(channelStore, function(){
this.group({
by:"#category#",
map:{id:["#category#"],category:["#category#"]}
});
});
$$("searchChannel").data.sort ("#category#","asc","string");
BUT, sadly it doesn’t do sorting at all. What’s wrong?
Thanks
Probably you need to call sort method right after group. I’ve attached the sample
sample.zip (183 KB)
izdi
#3
I finally made it works by callin inside onXLE event. Not sure if there will be other consuquencies…
channelStore.attachEvent(“onXLE”,function(id){
$$("searchChannel").sync(channelStore,this);
$$("searchChannel").data.group({
by:"#category#",
map:{id:["#category#"],category:["#category#"]}
});
$$("searchChannel").data.sort ("#category#","asc","string");
});
Hi,
probably the following will work as well:
$$("searchChannel").sync(channelStore, function(){
this.group({
by:"#category#",
map:{id:["#category#"],category:["#category#"]}
});
$$("searchChannel").data.sort ("#category#","asc","string");
});
izdi
#5
that will be easier to implement, but it doesn’t work.