Click here to Skip to main content
15,905,682 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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
JavaScript
<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

C#
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
Updated 20-Nov-12 19:17pm
v3
Comments
Richard C Bishop 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.
bbirajdar 20-Nov-12 22:56pm    
Nice scenario .. What is the ETA ?
[no name] 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900