Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Replacing OK and Cancel button by Server control button doesn't work in RowTemplate
posted

Hi,

I have a grid and I have added a rowtemplate user control.

I tried to replace the default OK and Cancel button on the user control and added a onlick event on it.

This event never gets fired on click of this new server control button.

Is there any reason for this?

What I want to achieve is as follows:
Click on OK button on the rowtemplate will have a ajax call to save the results in database and if successful will close the rowtemplate.
If it fails to save the record then the rowtemplate will remain open and the label on the top will get updated with error thrown.

Please help.

Regards,
Aparna.

Parents
No Data
Reply
  • 45049
    posted

    A row edit template that is "in use" only exists on the client.  When you try to post back, the row edit template is closed.  So, essentially, the control you clicked on the client doesn't exist on the server.

    You'll need to write JavaScript to initiate the AJAX call you want to trigger.

Children
No Data