Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Modal PopUp Extender pass back to a Edit itemTemplate in datagrid

$
0
0

Hi,

I am currently trying to pass a value back from my modal popup back into a datagrid that is editable.

In my datagrid I have an edit item template set up as

<HeaderTemplate><asp:Literal ID="ltlPartno" runat="server" Text="Part No" /></HeaderTemplate><HeaderStyle Width="50px" /><ItemTemplate><%# Eval("partno")%></ItemTemplate><EditItemTemplate><asp:TextBox ID="txtnewpart" runat="server" Text='<%# Eval("partno")%>' Width="50px" /></EditItemTemplate></asp:TemplateField>

When a user updates the row I carry out a check and display the old part vs the new part to allow the user to cancel if the Part is incorrect. At this point I want my gridview text box to remain editable but be updated with the original Partno So they can start again, Curently what happens is the Modal passes the value back into the Gridview Correctly but the field appears to be a label and not a text box but the rest of the row appears to be editable. Here is my Cancel Function

 protected void BtnCancelChange_Click(object sender, EventArgs e)
        {
            string strPartno = lblPartOldtxt.Text;
            strPartno = strPartno.Substring(0, strPartno.IndexOf(":"));
            int rownum = Convert.ToInt32(lblHidFild.Text);
            GV_AwaitingApp.Rows[rownum].Cells[4].Text = HttpUtility.HtmlEncode(strPartno);    

                       
        }


I think I am missing something obvious but for the life of me I cannot see what. Any help would be greatfully recived.

Thanks David




Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>