How can i pass value from grid view to a pop up in client side. I have a edit button in the grid view and when user clicks that the value(EditExpiresBy) from selected row should be in a text box in the pop up.
<asp:Panel ID="EditPanel" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txt_EditExpiresBy" runat="server" ></asp:TextBox>
<asp:Button ID="btn_EditSave" runat="server" Text="Save" onclick="btn_EditSave_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
and a PopupControlExtender.
How can I pass the value in client side. help needed
One way to do this is to have a
DetailsViewthat is linked to theSelectedValueproperty of yourGridView. You can put theDetailsViewin the popup, and it will display whatever was selected in theGridViewSample
DetailsViewNote: you would be putting this in place of the txt_EditExpiresBy TextBox controlSample Data source (for the
DetailsView)See the
ControlParameterin this DataSource looks at the ID of the row that was selected in theGridViewand uses that to populate theDetailsView.Let me know if any of this is not clear and I’ll try to explain myself better, this is just the way I usually do it.