选中的Vb.net Gridview模板字段复选框应获取行值

时间:2017-11-12 05:26:09

标签: c# vb.net

 <asp:GridView ID="gv_auth" runat="server" AutoGenerateColumns="false" CssClass="table table-hover table-striped w-100 table_permission">
                <Columns>
                    <asp:BoundField DataField="auth_id" HeaderText="PRIVILEGE ID" />
                    <asp:BoundField DataField="auth_dpt" HeaderText="DEPARTMENT" />
                    <asp:BoundField DataField="auth_desc" HeaderText="PRIVILEGES" />
                    <asp:TemplateField HeaderText="STATUS">
                        <ItemTemplate>
                            <label class='switch'>
                                <asp:CheckBox ID="chkrow" runat="server" Checked='<%# Eval("Auth_Selected") %>' /><span class='slider'></span>
                            </label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

当我点击复选框&#39; chkrow&#39;在模板字段中我应该得到相应的行值,如auth_id,auth_dpt,auth_desc等enter code here

0 个答案:

没有答案