I'm calling _doPostBack('UpdatePanel1', ''); in javascript and it updates my gridview after a record is inserted. The record is added from a panel above the gridview.
But when I make the same call after doing an update and delete, I get the following error: Microsoft JScript runtime error: Object expected on the line where I'm calling the function. I was having issues using JQuery to keep adding records with the insert, but this worked for me. But it doesn't work for the update or delete. I would like the most simple solution, and still keep it consistent. Note: I'm using Jquery and ajax to asynchronously perform the insert, edit, and deletes. When a row is clicked in the gridview by clicking the 'Select' link, I am populating a the fields in a panel above the gridview. I'm using JQuery so that I can use the cool dialogs that come with theme I selected from themerollers. Note I am doing event.preventDefault to intercept the event and then calling it's respective web service. For example, when I select a row from the gridview by clicking 'Select' link in the gridview, the row is displayed in the panel of above and allows for an edit. When the user changes information and clicks 'Save' - I call the web service to perform the edit (I know it is an edit by storing the key selected in an hidden field) . I then update that record in the grid using JQuery. When I click 'Delete' link, I again intercept the event and show JQuery confirmation box. When the user clicks 'Yes', then I call the web service to delete the row. I then remove the row using JQuery. Is this the best way to do this?? And why can't call the doPostBack passing the UpdatePanel (which contains the gridview) for all 3 - insert AND the update and delete? Any help is greatly appreciated!