I don't know the page which the new row will be in.
I used the function below , but it only gets the data of the first ten rows. How can I search the whole data ?
function findIndex(gelen) {
var rows = $("#dg_smart").datagrid("getData").rows;
for (var i = 0; i < rows.length; i++) {
if (rows
["otonum"] == gelen) {
return i;
}
}
return -1;
}
Maybe I can do it on the PHP side, by searching the index ( the index order is by name) of the last added row and then divide id to pageSize to find the page & etc. But if there is a simple way on the client side I want to use it.
There is also another problem finding the proper index. It could be asc or desc or more than one column can be sortable