I am using the WebDataGrid and adding, deleting rows with no problem. The issue I am having is that during an postback on the RowAdded event for the grid I am trying to use the following to insert a javascript function when the page comes back:
ScriptManager.RegisterStartupScript(this, this.GetType(), key, script, true);
The issue is the script never gets executed by the page. I have tried this in an UpdatePanel and not. Any ideas?
Not necessary. Using GridResponse object you can send any data back to the client during AJAX calls - including JavaScript to run:
http://codecorner.galanter.net/2011/05/02/affecting-page-during-webdatagrid-ajax-calls/
If you are doing that inside of the grid's internal Ajax post back, this script will never make it to the client. The grid does not use the scriptmanager's mechanism in that case.
To make it work you may want to try to wrap the grid with an UpdatePanel and set EnableAjax off the grid to False. In that case the grid will trigger a full postback, which will be intercepted by the UpdatePanel and the panel will bring the script to the client for you.