Title: datagrid selected Multiple Rows delete bug for easy1.4.2 !!! [BUG] Post by: zhangjin on June 13, 2015, 02:29:11 AM To obtain the index is not correct. It is Unable to delete.
Code: var rf=$('#modelFieldGrid'); var rows=rf.datagrid('getSelections'); for(var j=0;j<rows.length;j++){ var index = rf.datagrid('getRowIndex', rows[j]); rf.datagrid('deleteRow',index); } Title: Re: datagrid selected Multiple Rows delete bug for easy1.4.2 !!! [BUG] Post by: jarry on June 14, 2015, 07:52:37 AM The 'getRowIndex' method returns the index of the special row in the current page. This method returns -1 if the row does not exists. Please check your code carefully to see if the row is exists.
Title: Re: datagrid selected Multiple Rows delete bug for easy1.4.2 !!! [BUG] Post by: xiaohuo315 on June 26, 2015, 02:08:22 AM To obtain the index is not correct. It is Unable to delete. Code: var rf=$('#modelFieldGrid'); var rows=rf.datagrid('getSelections'); for(var j=0;j<rows.length;j++){ var index = rf.datagrid('getRowIndex', rows[j]); rf.datagrid('deleteRow',index); } I think after the code rf.datagrid('deleteRow',index) executed;,the 'rows' array will change. |