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);
}
Hello Bart,
Thank you for posting in our community.
Did you enable the BatchUpdating property of the EditingCore? If you did, then you should note that you can modify (edit, add, delete) multiple rows at once until post back occurs. Therefore when you attempt to delete rows on the client, the respective row to be deleted is only crossed with a line and at the left side of the row there is "Undo" button.
If you want to prevent this, you should set BatchUpdating property to false.
Another important thing is also that deleting of row on the client would be persisted if the data source that you're using supports auto CRUD operations. Otherwise you should handle the RowDeleting server side event and handle the deleted rows manually.
Attached is a sample with similar scenario for your reference.
Please let me know if you need any further assistance.
Sincerely,
Tsanna
Hi, yes, I enabled BatchUpdating on EditingCore so I would be able to modify multiple rows at once. That is exactly what I want. The problem is that deletions are implemented with a crossed out line. So, I can't set BatchUpdating to false because I would lose the multiple row edit before postback capability. I want to have BatchUpdating turned on and have rows be completely deleted in the UI.
If you need any further assistance regarding this matter please let me know.
Note that there is not currently any approach of completely removing a row without undo it on the client when BatchUpdating is enabled. However you could suggest this for future product versions at: http://ideas.infragistics.com
Here are the steps to create your idea:
1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.