Hi again!
The filter works fine but I can't get all the rows from the datagrid. In total I have about 2500 rows, if I apply the filter, I can get rows appeared after I filtered the table, but I can't get all the rows. I use the following code to get the rows:
var data = $('#productTable').datagrid('getData');
Is it possible to get all the rows?
For example, I need to get the total sum in the specified column, I do it like this:
function getAllRows(){
var data = $('#productTable').datagrid('getData');
return data.firstRows;
}
var rows = getAllRows();
var sum = 0.0;
for(var i=0; i<rows.length; i++){
sum += parseFloat(rows[i]['total']);
}
The other problem is that if I need to edit a row, I recieve inside the onDblClickRow:function(index, target) index which is == 1300 for example, but I have 100 rows after I applied a filter, consequently, if I try to get editors of this row in the onBeginEdit
onBeginEdit:function(rowIndex) {
var editors = $(this).datagrid('getEditors', rowIndex);
}
I have an error, because there is no such a row with the specified index in the table.
P.S. I use view: scrollview with my datagrid.