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
215
Webtab/ContentTabItem and prompting user that they have unsaved data before submitting.
posted

Two questions in one really. I have a webtab on the page.  On one of the tabs there is a ContentTabItem with DetailsView with Edit and Insert templates for various fields. There is a CommandField with Insert, Edit, Update and Cancel buttons.  There is a separate button on the page to submit all data to the database.

How can I 

a) Notify user if they have edited/inserted data in the contenttabitem using the commandfield buttons but haven't yet clicked the save/update/cancel commandfield button there to either discard or commit it to the objectdatasource the detailsview is bound to?

b) Automatically click the update button for them/commit their edit and continue on to my server side submission code afterward?

I hope that is clear.

Regards and thanks in advance.

Parents
  • 29417
    Offline posted

     Hello dougie ,

     

    Thank you for posting in our forum.

     

    In what event would you like to notify the users?

    If you need to notify them when the selected tab is changed you can use the SelectedIndexChanging client side event of the WebTab control and show a confirm dialog.

    Based on the selected option you can either cancel the selection changing ( set e.set_cancel(true) in the event) or you can programmatically click on the button: document.getElementById(“ButtonID”).click().

     

    I’m looking forward to your reply.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://www.infragistics.com/support

     

Reply Children