Click here to Skip to main content
14,971,029 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to bind category name from categoryTB table and same time i need to get that related subcategory name from subcategory table.....I need to display the category name onetime and below that i need to show thats subcategorynames with comma(,) seperator....like : http://dir.yahoo.com/[^]
just like display in the above link...how can i do that?

i am using stored procedure....So how can i get that data's from two table and displayed in gridview?
Posted
Updated 30-Sep-13 0:53am
v2

just use Gridview control within Gridview

XML
<asp:GridView ID="GridView1" runat="server" CellPadding="4"  ><Columns>
           <asp:TemplateField>
           <ItemTemplate>
              <table>
              <tr>
              <td>
               </table> <asp:Label ID="catagory" runat="server" Text=""></asp:Label>
              </td>
              <td>
                  <asp:GridView ID="GridView2" runat="server">
                  <Columns>
                  <asp:TemplateField>
                  <ItemTemplate>
                      <asp:Label ID="subcatagory" runat="server" Text=""></asp:Label>
                  </ItemTemplate>
                  </asp:TemplateField>
                  </Columns>
                  </asp:GridView>
              </td>
              </tr>


           </ItemTemplate>
           </asp:TemplateField>
           </Columns>

       </asp:GridView>



Bind the Subcatagory values at Gridview1 Row Databound..


Got It...
   
   
Comments
SnvMohan 30-Sep-13 7:26am
   
Its working.... Thank you
[no name] 30-Sep-13 7:30am
   
Glad to help you..:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900