Reputation: 19406
I have a web page with:
My new requirement is the following:
If a user clicks the save button and there are any pending inserts in the RadGrid or the RadListView, then finish inserting them. In other words, the buttons I'm showing below in the grids' insert form has not been clicked.
Currently, the RadGrid insert doesn't insert to the database until it's own save button is clicked:
The same is true with the RadListView though the button looks slightly different:
Is there a way for me to call the InsertCommand of each grid from the save button that is outside of the grids?
Upvotes: 0
Views: 731
Reputation: 19406
RadGrid:
myRadGrid.MasterTableView.GetInsertItem().FireCommandEvent("PerformInsert", String.Empty)
RadListView:
myRadListView.InsertItem.FireCommandEvent("PerformInsert", String.Empty)
Caveat: If you have multiple telerik grids/listviews on a page with pending inserts, calling one of these will lose the data in the other so there will be more work to be done if there are multiple grids.
Upvotes: 1