删除放置在ajax选项卡容器中的GridView的Checkbox选中的行 [英] Deleting the Checkbox checked rows of GridView placed in ajax tab container

查看:74
本文介绍了删除放置在ajax选项卡容器中的GridView的Checkbox选中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码,我要删除ajax选项卡容器内放置的gridview的选中复选框.
任何人都向我发送代码如何访问放置在ajax tabcontainer内的gridview复选框选中的值.

This is my code ,I want delete check box checked values of gridview placed inside the ajax tab container.
Any one send me code how to access checkbox checked values of gridview placed inside the ajax tabcontainer.

<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
                <ContentTemplate>
                    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"

                        Width="690px" Height="408px">
                        <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="Open Invitation">
                        <HeaderTemplate>Open Invitation</HeaderTemplate><ContentTemplate><br /><br />Search Friend
                        <asp:TextBox ID="txtSearch" runat="server" Height="20px" Width="205px"></asp:TextBox>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click"

                                Text="Search" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnDelete" runat="server" onclick="btnDelete_Click"

                                Text="Delete" />
                            <br /><br />

                        <asp:GridView runat="server" ID="gvFriends" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"

                         onpageindexchanging="gvFriends_PageIndexChanging" PageSize="8"

                                DataKeyNames="EmailID" Width="655px"

                                onrowdatabound="gvFriends_RowDataBound">
                            <RowStyle BackColor="#EFF3FB" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                            <asp:TemplateField>
                               <HeaderTemplate>
                                <asp:CheckBox ID="chkheader" runat="server" onclick="javascript:SelectheaderCheckboxes(this)" AutoPostBack="True" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkchild" runat="server" AutoPostBack="True" />
                           </ItemTemplate>
                            </asp:TemplateField>
                           <asp:BoundField DataField="EmailID" HeaderText="SentTo" />
                           <asp:BoundField DataField="CountIncrement" HeaderText="No. of time Sent" />

                        </Columns>
                        </asp:GridView>

                        </ContentTemplate></asp:TabPanel>

推荐答案

请首先将复选框的AutoPostback 属性设置为true.
然后尝试再次运行,我认为它会按您的期望运行.
please first of all Set AutoPostback property of your check box to true.
then try to run again, i think it will work fine as per your expectation.


这篇关于删除放置在ajax选项卡容器中的GridView的Checkbox选中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆