Hi
I am trying to bind two checkboxes in a datagrid. The 1st Checkbox is category and the 2nd Checkbox is sub category. A category can have several sub categories. When i bind the 1st checkbox the category name is repeated more than once and I need to have only one checkbox for one category. Please find the code below:
<asp:DataList ID="title_dl" runat="server" DataSourceID="title_dss" DataKeyField="M_CATPAGES_ID" >
<ItemTemplate>
<td><asp:Checkbox ID ="cat_title_chk" AutoPostBack="true" runat="server" Text='<%# Container.DataItem("M_CATPAGES_CAT") %>'></asp:Checkbox> </td>
<td><asp:CheckBox ID="sub_cat_chk" runat="server" Text='<%# Container.DataItem("M_PAGES_PAGES") %>'></asp:Checkbox> </td>
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="title_dss" runat="server" ConnectionString="Driver={MySQL ODBC 3.51 Driver};DATABASE=laqualite;option=0;pwd=cadt12;port=0;server=10.20.18.50;uid=root" DataSourceMode="DataReader" ProviderName="System.Data.Odbc" SelectCommand="Select M_PAGES_ID_PK,M_PAGES_PAGES,M_CATPAGES_ID,M_CATPAGES_CAT From mast_pages_tbl,mast_catpages_tbl Where M_CATPAGES_ID = M_PAGES_CATID and M_PAGES_ID_PK <> '27' Order By M_CATPAGES_CAT"></asp:SqlDataSource>