Problem deleting multiple rows from grid on client side

2 replies. Last post: April 5, 2010 8:21 AM by Darren Budd
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Darren BuddMember

Hi,

 

I have a webgrid, with a rowchecker column.  I am trying to delete all of the checked rows from the grid on the client side.  There is no data updating required at this stage, just deleting from the grid.  However, I only seem to be able to get the first checked row to delete.

 

Here is the relevant code from my javascript function:

var checkedRows = grid.RootTable.GetCheckedRows(); if (checkedRows.length > 0)

{

for(var i=0; i<checkedRows.length; i++)

{

var htmlRow = grid.RootTable.GetCheckedRows()[i]; var wgRowObject = grid.RootTable.ToRowObject(htmlRow); if (wgRowObject.KeyValue != '') wgRowObject.Delete(); }

}

 

Has anyone got any idea why this migh not be working for me?

 

thanks

All times are GMT -5. The time now is 6:20 PM.
Previous Next