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
575
WebDataGrid: remove rows via javascript
posted

I read this tutorial:

http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/WebDataGrid_Enabling_Row_Deleting.html

I have a WebDataGrid entirely populated via javascript (volatile data, no need to write it to database, and I don't want postbacks to retrieve data each time). While adding rows to the grid works perfectly using

var grdPrices = $find('<%: grdprices="" clientid="">');

var arrData = myArray[i].split("|");

grdPrices.get_rows().add(arrData);

I can't remove rows from the same grid using the method you provided in the tutorial:

var nLines = grdPrices.get_rows().get_length();
for (i = 0; i < nLines; i++)
{
     grdPrices.get_rows().remove(grdPrices.get_rows().get_row(0));
}

The only result I have is that the first row of the grid changes CSS, using igg_DeletedRow style, but no row is actually deleted.

How can I clear the grid via javascript?

I'm using Net Advantage 2012.1 with Net Framework 4.0.