<pre lang="xml"><asp:Panel ID="pnlPopup" runat="server" Width="700" Style="display: none;" > <div id="divSimplePopup" class="popup"> <div class="headerpop" runat="server" id="aa"> <span id="lblPopupHeader" class="msg">Requisition</span> </div> <asp:UpdatePanel ID="upDatePanl" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="btnShowPopup" runat="server" Text="Button" Style="display: none;" /> <cc1:ModalPopupExtender CancelControlID="btnClose" ID="mdlPopup" runat="server" TargetControlID="btnShowPopup" PopupControlID="pnlPopup"> </cc1:ModalPopupExtender> <asp:GridView ID="grdReq" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" Font-Size="Small" GridLines="Vertical" HorizontalAlign="Center" Width="100%" Visible="false" AllowPaging="true" PageSize="10" OnRowCommand="grdReq_RowCommand" > <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <RowStyle BackColor="#EEEEEE" ForeColor="Black" /> <Columns> <asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Center"> <HeaderTemplate> Select </HeaderTemplate> <ItemTemplate> <asp:RadioButton ID="rdoButton" runat="server" OnSelectedIndexChanged="rdoButton_CheckedChanged" AutoPostBack="True"></asp:RadioButton> </ItemTemplate> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> <ItemStyle HorizontalAlign="Center"></ItemStyle> </asp:TemplateField> <asp:TemplateField HeaderText="ID" Visible="true"> <ItemTemplate> <asp:Label ID="lblId" runat="server" Text='<%# Eval("RequisitionID") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </ContentTemplate><pre lang="HTML">
<div class="footerpop"> <input class="button_popup" id="btnClose" type="submit" value="Cancel" /> </div> </div> </asp:Panel>
this.grdReq.RowCommand += new GridViewCommandEventHandler(grdReq_RowCommand); void grdReq_RowCommand(object sender, GridViewCommandEventArgs e) { RadioButton rdb = FindControl("rdoButton") as RadioButton; foreach (GridViewRow row in grdReq.Rows) { if (rdb.Checked == true) { ddlRequisitionID.Text = row.Cells[1].ToString(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)