My Scenario
I have a grid which allows inline editing. When the user clicks a hyperlink in any row I open a radwindow. The hyperlink is a template cell and I open the RadWindow via javascript which all works fine except that I need to be able to save the row before opening the radwindow if it is in edit mode because I'm passing in the unique id of the row and if it is a new row I need to perform the insert command first so that the Id is generated on the server. The data is in SQL and the Id is an Identity column. I'm also using automatic updates on the grid.
My Question
Is it possible to save the row and invoke the insert command when the user clicks the hyperlink/template cell? If so can you provide sample code on how this could be done from javascript or server side code. Both would be idea. Thank you!
Here is the template column used to open the RadWindow
<telerik:GridTemplateColumn HeaderText="Selection Options" UniqueName="SelectionOptions" AllowFiltering="false">
<ItemTemplate><a href="#"
onclick='openAnswerOptionsWindow('<%# DataBinder.Eval(Container.DataItem, "LCFormMetadataId") %>'); return false;'>
SelectionOptions</a></ItemTemplate>
</telerik:GridTemplateColumn>
Here is the javascript I use to open the RadWindow
function openLCFormManagementWindow() {
var oWnd = radopen("LCFormMaintenance.aspx");
oWnd.Center();
}