Hi,
I am using WebDataGrid (vol 12.1) in my project. I basically list the files present in a folder inside the grid. I also have an option to delete single / multiple file(s). When i select and delete a file, i am just hiding that row. All of this is done in client-side. I have enabled Batch Updates
<Behaviors> <ig:EditingCore AutoCRUD="False" BatchUpdating="True"></ig:EditingCore> <ig:Selection CellClickAction="Row" RowSelectType="Multiple"></ig:Selection></Behaviors>
I am not able to delete multiple rows at a single go. For example, in the grid i have 7 rows, and i select 3 rows to be deleted and i click on "Del" button. Instead of deleting 3 rows, it is deleting only 1 single row. The code i have written in client-side for "Del" button is shown below
var grid = $find("WebDataGrid1");var selectedRows = grid.get_behaviors().get_selection().get_selectedRows(); for (var j=0; j< selectedRows.get_length();j++) { grid.get_rows().remove(selectedRows.getItem(j), false); }
After clicking on the "Del" button, i am able to get the count as 3. After removing the first row, the selectedRows.get_length() becomes 0. What could be the problem? Can we delete multiple rows in the grid in client-side? If so How? I am converting my UltraWebGrid to WebDataGrid.
Thanks,Raja.
Please send me anu Zip File
http://ko.infragistics.com/products/jquery/sample/grid/editing
this url was not working sir.
Hi ,
How do I clear WebDataGrid at client side, instead of deleteing all row using loop
-Rohan
Hello Raja,
Thank you for your reply.
Glad that the issue seems to be resolved.
Please do not hesitate to contact me if any questions arise.
Hello Petar,
Sorry for the late reply as i was busy in another project. i found out the reason the Asyn errors occurs was during postback i am not binding the grid and the grid expects it. So i stored the Dataset in a session variable and then in postback just binding the grid to the session variable. Now i am able to add (or) delete a file in the grid.
As for your suggestion for using jquery Grid, let me check it