title: Pass parameters withing Datasource
body: <p>I need help passing a parameter to the DataSource <code>BindCompanyCharItems()</code> to filter records, which I bind to a <code>CheckList</code> called <code>chklstCompCharItems</code>. </p>
  
  <p>The parameter I am trying to use is <code>&lt;asp:BoundField DataField="Id" HeaderText="CompCharID" /&gt;</code></p>
  
  <p>My GridView:</p>
  
  <pre><code>&lt;asp:GridView ID="grid_Data" runat="server" Width="100%" AutoGenerateColumns="false"&gt;
     &lt;Columns&gt;
          &lt;asp:BoundField DataField="Id" HeaderText="CompCharID" /&gt;
          &lt;asp:BoundField DataField="Name" HeaderText="Comp Char Name" /&gt;
          &lt;asp:TemplateField HeaderText="Invite Permission"&gt;
          &lt;ItemTemplate&gt;
               &lt;asp:CheckBoxList ID="chklstCompCharItems" DataSource='&lt;%# BindCompanyCharItems()%&gt;' DataTextField="Name" DataValueField="Id" SelectedValue='&lt;%# Bind ("Id") %&gt;'  runat="server"&gt;
               &lt;/asp:CheckBoxList&gt;  
          &lt;/ItemTemplate&gt;
         &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>