I have a checkbox for all rows in the grid. I want the user to be able to delete multiple rows by selecting as many as they want and then hit "delete." Kind of like email in Gmail/Yahoo, etc.
I have two issues.
One, I get a warning for every row that the user tries to delete. Can I suppress this warning? I can't find the setting anywhere.
Two, when the last row tries to delete in my foreach loop, I get an error:
InvalidaOperationException... Any idea what's going on here and how to fix this? It happens on the last selected is to be deleted... Please let me know your thoughts. I seearched the forums and couldn't find anything.
Okay, found the "displayPrompt" as a possible overloaded argument. I still don't know how to delete multiple rows without getting an error!! Seems like the grid might be refreshing on each delete which is causing me some issues...
In case anyone wanted to see my code:
public static void RemoveSelected(string columnKey, JWWinGrid grid) { foreach (UltraGridRow row in grid.Rows) { if ((bool)row.GetCellValue(grid.Columns[columnKey])) { row.Delete(); } } }