This is a migrated thread and some comments may be shown as answers.

[Solved] Client-side Insert/Delete rows

1 Answer 215 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pierre-Luc
Top achievements
Rank 1
Pierre-Luc asked on 16 Apr 2009, 04:58 AM
Hello,

For the past hours, I tried different ways to perform insert and delete of rows on client-side, without success.

Basically, I use a Web Service to make the insertions but I would like to be able to insert that new row on client instead of getting a whole new datasource from the server for just adding that new row. Same thing with deleting a row.

These are the different calls I'm trying to accomplish :

var grid = $find("<%=RadGrid1.ClientID%>");
var tableview = $find("<%=RadGrid1.ClientID%>").get_masterTableView();

// For inserting
tableview.insertItem("");    //Throw an error
tableview.fireCommand("InitInsert", "");   // Do nothing

// For deleting
tableview.deleteItem(myIndex);    // Do nothing
tableview.deleteSelectedItems(); // Do nothing
tableview.fireCommand("Delete", myIndex);  // Do nothing


I also setted the options AllowAutomaticDeletes and AllowAutomaticInserts to true on my MasterTableView, but with no success.

This is a MUST to be able to inserting/updating/deleting rows on the client! Please help!

Thanks in advance!
Pierre-Luc

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Apr 2009, 05:45 AM
Hello Pierre-Luc,

You can go through the following online demo which illustrates how to Insert/ update/delete grid records client-side using external form and bind the grid on the client. Probably this should help you get started.
Client-side Insert/Update/Delete

Thanks
Princy.
Tags
Grid
Asked by
Pierre-Luc
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or