Problem in sorting in dhtmlxdataview

Hi…
when im using costum sorting
data.sort(function(c3, c4){
alert(c3.cost);
return c3.cost > c4.cost?1:-1;
},“asc”);
where cost is one value in item…, c3.cost is showing as undifened…can u please help me i want to sort item according to some value…but it is not sorting…

Thanks
Seenu

Hi,

there is a bug in dataview custom sorting. We’ll fix the problem in the 3.0 version. Currently you may use another approach:

data.sort("#cost#",“asc”,“int”);

or

data.sort("#cost#",“asc”,function(c3, c4){
return c3>c4?1:-1;
});

HI…

Thank you very much…

Regards
Seenu