我需要帮助将参数传递给 DataSourceBindCompanyCharItems()
以过滤记录,我将其绑定到CheckList
被调用的chklstCompCharItems
.
我尝试使用的参数是<asp:BoundField DataField="Id" HeaderText="CompCharID" />
我的网格视图:
<asp:GridView ID="grid_Data" runat="server" Width="100%" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Id" HeaderText="CompCharID" />
<asp:BoundField DataField="Name" HeaderText="Comp Char Name" />
<asp:TemplateField HeaderText="Invite Permission">
<ItemTemplate>
<asp:CheckBoxList ID="chklstCompCharItems" DataSource='<%# BindCompanyCharItems()%>' DataTextField="Name" DataValueField="Id" SelectedValue='<%# Bind ("Id") %>' runat="server">
</asp:CheckBoxList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>