title: DropdownList with Checkbox in a GridView
body: <p>Here is my current grid view.</p>
  
  <pre><code>&lt;asp:GridView ID="grdIndexGroupMap" runat="server" AutoGenerateColumns="False" DataKeyNames="IndexName"
              OnRowCancelingEdit="grdIndexGroupMap_RowCancelingEdit" OnRowDataBound="grdIndexGroupMap_RowDataBound"
              OnRowEditing="grdIndexGroupMap_RowEditing" OnRowUpdating="grdIndexGroupMap_RowUpdating"
              OnRowCommand="grdIndexGroupMap_RowCommand" ShowFooter="True" OnRowDeleting="grdIndexGroupMap_RowDeleting"
              CellPadding="1" CellSpacing="1" ForeColor="#333333" GridLines="None"&gt;
              &lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&gt;
              &lt;Columns&gt;
                  &lt;%--IndexName--%&gt;
                  &lt;asp:TemplateField HeaderText="IndexName" HeaderStyle-HorizontalAlign="Left"&gt;
                      &lt;EditItemTemplate&gt;
                          &lt;asp:DropDownList ID="cmbIndexName" runat="server" DataTextField="LocationName" DataValueField="IndexId"&gt;&lt;/asp:DropDownList&gt;
                      &lt;/EditItemTemplate&gt;
                      &lt;ItemTemplate&gt;
                          &lt;asp:Label ID="lblIndexName" runat="server" Text='&lt;%# Eval("IndexName") %&gt;'&gt;&lt;/asp:Label&gt;
                      &lt;/ItemTemplate&gt;
                      &lt;FooterTemplate&gt;
                          &lt;asp:DropDownList ID="cmbNewIndexName" runat="server" DataTextField="IndexName" DataValueField="IndexId"&gt;&lt;/asp:DropDownList&gt;
                      &lt;/FooterTemplate&gt;
                      &lt;HeaderStyle HorizontalAlign="Left"&gt;&lt;/HeaderStyle&gt;
                  &lt;/asp:TemplateField&gt;
              &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>How do replace the DropDownList with a dropdown where I can select multiple items?
  A checkboxlist in dropdownlist or a listbox with multiselect in dropdown. When selected will show comma seperated values. </p>
  
  <p>Tried a couple of ways but wont work.</p>
  
  <p>here is my databound method:</p>
  
  <pre><code>protected void grdIndexGroupMap_RowDataBound(object sender, GridViewRowEventArgs e)
          {
              if (e.Row.RowType == DataControlRowType.DataRow)
              {
                  DropDownList cmbIndexName = (DropDownList)e.Row.FindControl("cmbIndexName");
                  if (cmbIndexName != null)
                  {
                      cmbIndexName.DataSource = _Indexes;
                      cmbIndexName.DataTextField = "IndexName";
                      cmbIndexName.DataValueField = "IndexId";
                      cmbIndexName.DataBind();
                      cmbIndexName.SelectedValue = grdIndexGroupMap.DataKeys[e.Row.RowIndex].Values[1].ToString();
                  }
              }
              if (e.Row.RowType == DataControlRowType.Footer)
              {  
                  DropDownList cmbNewIndexName = (DropDownList)e.Row.FindControl("cmbNewIndexName");
                  cmbNewIndexName.DataSource = _Indexes;
                  cmbNewIndexName.DataBind();
              }
          }
  </code></pre>
  
  <p>I am using ASP.Net, C# </p>