Click here to Skip to main content
12,690,575 members (33,612 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript .NET jQuery .NET4 , +
Scenario is :
The grid view has paging enabled in it. When a user is making any change in the grid view rows. A popup should come on PageIndexChanging event to save the made changes or not. If user clicks on yes then a server side method should be called and moved to next page else simply moves to next page.

I am trying to do this using ModalDialogPopup. And able to create using
<pre lang="cs">function SubmitData() {
    var _html = document.createElement('div');
    _html.innerHTML = $("#divConfirmationModal").html();

    var options = {
        title: "Confirm Data Submission",
        width: 400,
        height: 200,
        showClose: false,
        allowMaximize: false,
        autoSize: false,
        html: _html
    };
    SP.UI.ModalDialog.showModalDialog(options);
}





but not able to bind the server side method in

function SubmitDataCallback(dialogResult) {
    if (dialogResult === SP.UI.DialogResult.OK) {
        //SaveToSPList();
    }

    if (dialogResult === SP.UI.DialogResult.cancel) {
        //MoveToNextPage();
    }
}


I don't know how to do that.
Posted 20-Nov-12 8:05am
Updated 20-Nov-12 20:17pm
v3
Comments
richcb 20-Nov-12 16:04pm
   
That is not a question. You will need to post the code you have tried and ask a specific question as to where you are stuck for people to be able to help you.
aspnet_regiis -i 20-Nov-12 22:56pm
   
Nice scenario .. What is the ETA ?
Krunal R 21-Nov-12 1:42am
   
Hey try to update the data here,
if (dialogResult == SP.UI.DialogResult.OK) {
//SaveToSPList();
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170117.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100