I have a grid view control with list of rows items. Each rows has a button which would triggers a client side pop up modal form to ask the user to enter some data before continue to execute the server side method. The problem is I cant find a way to continue the postback after the user clicked 'Confirm' button on the modal form. Most importantly, the server side method is reside within a DataGrid OnItemCommand Event. Before the method would be executed, several parameters from the other column in the same row would be collected. Any idea to deal with this ? Appreciate so much for anyone can solve it.

//Page aspx

<link href="jquery-ui-1.7.2.custom.css" type="text/css" rel="stylesheet"/>
<script src="../../Javascript/jquery-1.4.2.min.js" type="text/javascript">
<script src="../../Javascript/jquery-ui-1.8.2.custom.min.js" type="text/javascript">

<script type="text/javascript">

        $(document).ready(function () {

                autoOpen: false,
                height: 280,
                modal: true,
                resizable: false,
                open: function(type, data) {$(this).parent().appendTo("form");},
                buttons: {
                    'Cancel': function () {
                        // Submit Rating
                        return false;
                    'Confirm': function () {
                        // Update Rating


        function employeeNumberModal() {





 <form id="Form1" method="post" runat="server">
<asp:Grid ID="grid" runat="server">

<asp:BoundColumn Visible="False" DataField="cand_id" SortExpression="cand_id">
<asp:BoundColumn Visible="False" DataField="job_post_id" SortExpression="job_post_id">
<asp:BoundColumn Visible="False" DataField="schd_id" SortExpression="schd_id">

 <ItemStyle HorizontalAlign="Center"></ItemStyle>
 <asp:Button ID="btnSync" runat="server" Text="Sync Employee" OnClientClick="if(!employeeNumberModal()) return false;"


<div id="dialog" title="New Employee Number">
<p>Please enter new employee number for the candidate</p>
<p><asp:TextBox ID="txtNewEmpNo" runat="server" Width="80%"></asp:TextBox></p>


//code behind

this.grid.ItemCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.grid_ItemCommand);

private void grid_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
    switch (e.CommandName)
        case "Sync":
                    CandidateBusiness candBizObj = new CandidateBusiness();
                    candBizObj.CandidateId = e.Item.Cells[0].Text;
                    candBizObj.JobPostId = e.Item.Cells[1].Text;
                    candBizObj.ScheduleId = e.Item.Cells[2].Text;
4 Years
Discussion Span
Last Post by annaharris
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.