Hello sir,
We try to implement filter/search form on dhtmlxgrid pagination but it shows error:
"Uncaught TypeError: Cannot read property ‘_locator’ of null "
Here is the grid code:
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../lib/dhtmlx/dhtmlxGrid/codebase/imgs/");//path to images required by grid
mygrid.setHeader("Mã, Tên, ĐVT, Giá bán, Giá nhập, Mô tả, Ghi chú");//set column names
mygrid.setInitWidths("100,200,80,100,100,100,100,100");//set column width in px
mygrid.setColAlign("left,left,left,right,right,left,right,right");//set column values align
mygrid.setColTypes("ed,ed,coro,ed,ed,ed,ed,img");//set column types
mygrid.setColSorting("str,str,str,int,int,str,int,str");//set sorting
mygrid.enableMultiselect(true); // false by default
mygrid.enablePaging(true, 20, null, "pagingArea", true);
mygrid.setPagingSkin("toolbar", "dhx_web");
//mygrid.setColumnColor('blue');
//mygrid.cells(id,i).setTextColor("black");
mygrid.init();//initialize grid
mygrid.setSkin("dhx_terrace");//set grid skin
mygrid.loadXML("getdata.php");
We have an input field with id of ip_product_id, and here is the code when click search button:
mygrid.filterBy(0,$("#ip_product_id").val());
The filter works fine without pagination.
Please help us on this issue, thankyou
Hungnd,