Question :
I have a data grid with 1000 records when i perform a search on a table, i need to remove all records in the data grid when i call a method, how can i do that ?
Answer :
1. We could load an empty data set to the data grid.
$('#dg').datagrid('loadData', {"total":0,"rows":[]});
2. We could remove only the selected records in the data grid.
var rows = $('#tt').datagrid('getSelections'); // get all selected rows
for(var i=0; i<rows.length; i++){
var index = $('#tt').datagrid('getRowIndex',rows[i].id); // get the row index
$('#tt').datagrid('deleteRow',index);
}
Subscribe to:
Posts (Atom)
JWT Token Decode Using Jquery
When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...
-
In this blog post Ill explain you the logic behind the Sri Lankan National Identity Card (NIC). Sri Lanka now has Old NIC No Format as well ...
-
In This Article I Will Demonstrate You To Create A Simple Chat Program Using Java Remote Method Invocation(RMI). Following Program Supports ...
-
In a windows form application sometimes you may want to import a excel file to a data grid view. In this blog post Ill demonstrate to you gu...