Hi,
I’m using a grid of three columns. One of these columns has the type coro.
We have decided to have a “Case insensitive sorting” ont this column.
In fact, we have implemented the function str_custom discribed in the documentation.
When we look at the cell it works .
I have two questions :
- When we try to to sort the column with a click on the header we have got a javascript error : " Object doesn’t support this property or method "
Where am i wrong ? - We have positionned a filter “#select_filter”, on this column. When we look at the filter, it is case sensitive.
Is there a way to get in the filter a non case sensitive sort ?
Here is my code :
function doInitMyGridActions(){
actionsGrid = new dhtmlXGridObject(‘actions_container’);
actionsGrid.setImagePath(folderimagename);
actionsGrid.setHeader(“Id, Utilisateur, Groupe”);
// Pour le dataprocessor
actionsGrid.setColumnIds(“id, utilisateur,groupe”);
actionsGrid.attachHeader(“#text_filter, ,#select_filter”);
actionsGrid.setInitWidths(“200,,”);
actionsGrid.setColAlign(“left,left,left”);
actionsGrid.setColSorting(“str,str,str_custom”);
actionsGrid.setColTypes(“ro,combo,coro”);
//Skin
actionsGrid.setSkin(“light”);
// events
actionsGrid.enableColumnMove(false);
actionsGrid.enableColumnAutoSize(true);
//Pagination
actionsGrid.enablePaging(true, 20, null, “pagingArea”, true, “recinfoArea”);
actionsGrid.setPagingSkin(“toolbar”);
//Option de serialization
actionsGrid.init();
//Combo
var combo = actionsGrid.getColumnCombo(1);
combo.enableFilteringMode(true);
combo.loadXML(fileldap);
actionsGrid.loadXML(filename);
}
function str_custom(a,b,order){ //the name of the function must be > than 5 chars
if (order==“asc”)
return (a.toLoweCase()>b.toLoweCase()?1:-1);
else
return (a.toLoweCase()<b.toLoweCase()?-1:1);
}