Hello fellow programmers, got a few problem here. I am adding a user control inside a gridview. Now my question is how can bind it cause inside the user control is a gridviewthat needs the CourseCatID so that it could bind the datas. And by the way I cannot use nested griview cause I need the render of the nested usercontrol for another purpose. Any tutorial/help will be gladly appreciated.
<asp:GridView ID="grdCategory" runat="server" AutoGenerateColumns="False" Width="1100px"
DataKeyNames="CourseCatID" Font-Names="verdana,arial,helvetica,sans-serif" Font-Size="8pt"
CellPadding="4" ForeColor="#333333" GridLines="None">
<Columns>
<asp:ButtonField Text="SingleClick" CommandName="SingleClick" Visible="False" />
<asp:BoundField HeaderText="CourseCatID" Visible = "false" DataField="CourseCatID" />
<asp:TemplateField HeaderText="Course Category">
<ItemTemplate>
<asp:Label ID="lblCourseCatID" runat="server" Visible="false" Text='<%# Eval("CourseCatID")%>'></asp:Label>
<a href="javascript:toggleDiv('mydiv<%# Eval("CourseCatID")%>')">
<asp:TextBox ID="txtCourseCatName" runat="server" Text='<%# Eval("CourseCatName") %>' Font-Size="XX-Small"
Font-Names="Verdana" Width="300px" Visible="false"></asp:TextBox>
<asp:Image ID="img" onclick="javascript:Toggle(this);" runat="server" ImageUrl="~/Images/minus.gif"
ToolTip="Collapse" Width="7px" Height="7px" ImageAlign="AbsMiddle" /></a>
<asp:Label ID="lbllastname" Height="15px" runat="server" Text='<%# Eval("CourseCatName")%>'> </asp:Label>
<div id="mydiv<%# Eval("CourseCatID")%>">
<br />
      <%--OnClick="ImageAdd_click" --%>
<asp:ImageButton ID="ImageAdd" Height="17px" ImageUrl="Images/addCourse.png" runat="server"
CommandName="cmdAdd" CommandArgument='<%# Eval("CourseCatID") %>' />
<br />
<br />
      
<asp:Panel ID="pnlCourse" runat="server"></asp:Panel>
<b><cuc1:CourseUserControl ID="CourseUserControl1" runat="server" /></b>
<br />
<br />
<br />
<br />
</div>
</ItemTemplate>
</asp:TemplateField>
Thank you for your time