Click here to Skip to main content
12,830,320 members (46,011 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
I have a modal pop up extender and this is hide popup .i take a gridview in Popup . But no event fire OnRowcommand .Following aspx

<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>

                                    <asp:UpdatePanel ID="upDatePanl" runat="server" UpdateMode="Conditional">
                                            <asp:Button ID="btnShowPopup" runat="server" Text="Button" Style="display: none;" />
                                            <cc1:ModalPopupExtender CancelControlID="btnClose" ID="mdlPopup" runat="server" TargetControlID="btnShowPopup"
                                            <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" />
                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Center">
                                                            <asp:RadioButton ID="rdoButton" runat="server" OnSelectedIndexChanged="rdoButton_CheckedChanged"
                                                        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                   <asp:TemplateField HeaderText="ID" Visible="true">
                                                    <asp:Label ID="lblId" runat="server" Text='<%# Eval("RequisitionID") %>'></asp:Label>

                                        </ContentTemplate><pre lang="HTML">


<div class="footerpop">
                                    <input class="button_popup" id="btnClose" type="submit" value="Cancel" />


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();


this grdReq.RowCommand += new GridViewCommandEventHandler(grdReq_RowCommand) can not fire .but why. pls help me
Posted 1-Jan-13 0:56am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

As you're just changing selections in your 'event', you'd do better to write jquery to do it on the client without a postback. In general, you'd do well to stop laying competing MS libraries on top of each other, and use jquery.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 1 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100