I’ve just buy the DHX Grid pro, and I’m beginning with object.
“_Locator is null or is not a object”
It is just a small test, with “static” values to see what filter do, something like:
So, nothing complex.
The references in the page are:
I’m using IE7.
Thanks for your advise,
Can you please provide full init code use in your test
Be sure that filterBy called after data loaded in grid ( the data loading is async process , so you need to use onXLE event or second parameter of loadXML )
Also, be sure that each row has unique ID , not unique or missed IDs may be the reason of the problem.
THanks for yor answer.
The problem might be that the datas are loaded only by the function AddRow(…), for the moment. Could it be the reason of the error ?
As I have a pro version, I can imagine changing a few things and load data in grid by creating a CSV string and using ‘loadCSVString(str)’ function, if it could solve the problem.
For the code before the “AddRow” section is:
grid_t = new dhtmlXGridObject(‘grid_t’);
grid_t.setHeader(“T, *, A, D”);
Could it be the reason of the error ?
It must work correctly, please check attached sample.
>>As I have a pro version, I can imagine changing a few things and load data in grid by creating a CSV
Technically standar edition has all necessary for such action
grid.parse(“csv string here”,“csv”);
dhtmlx.com/docs/products/dhtmlxG … oadingdata
1223548439.zip (98.2 KB)
Thanks for the answer.
I took your code (init of a grid, addRow and then filter), and it works.
But whatever I do, filtering on my own grid is not working. I don’t see why.
The generated code for insertion of rows is (for example):
"addRow(grid_t.uid(), [1, 0, “a_value1”, “a_value2”], 1);
_locator is still considered as null or undefined.
Change your code to the
addRow(grid_t.uid(), [1, 0, “a_value1”, “a_value2”])
When you are using 1 as last parameter - you adding row to the position “1”, while row indexes started from “0”, as results you have grid filled with data from index 1, and not filled row at position 0, which will cause an issue.
When addRow used without last parameter - it will add row to the end of the grid.
Ok, that was it … it seems so simple now; sorry.
So, everything works fine now.