Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
How do I completely remove a row without undo using Javascript
posted

Hi, I would like to completely remove a row from a WebDataGrid so it no longer displays in the grid even though the post back has not occurred yet. Right now the row is just grayed and crossed out and there is a undo button placed over the row. I want it to disappear completely.

 

Here is my current JS:

 

 

function DeleteSelectedRows() {     var WebDataGrid1 = $find("WebDataGrid1");

    var rows = WebDataGrid1.get_rows();

     for (i = 0; i < rows.get_length() ; i++) {

         var row = rows.get_row(i);

         var checked = row.get_cell(0).get_value();

         if (checked) {

             rows.remove(row);

         }

     }

 }