• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

HierarGrid - I need to add the child datagrid

Who understands how to implement the Hierargrid by Denis Bauer ?

I downloaded and studied the demos and am reading the "How to article" :
at http://aspalliance.com/articleViewer.aspx?aId=21&pId=#Page1

What I need to do is quite simple. However the documentation seems over complicated.

My parent table is Services.  For each service, there are multiple providers. The article uses stored procedures. I have substituted SQL Statements in the code behind. The article says to drop a child datagrid into a template. I have done that. It does not explain how to reference the child datagrid in the parent aspx page. The main grid is working.  

Here is what I have:

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
      <dbwc:HierarGrid id="grdServices"
      style="Z-INDEX: 101; LEFT: 80px; POSITION: absolute; TOP: 24px"
      runat="server"
      Width="432px" AutoGenerateColumns="False"
      DataKeyField="ServiceID"
      DataSource="<%# DstServices1 %>"
      TemplateCachingBase="Tablename"
      LoadControlMode="UserControl"
      TemplateDataMode="Table">
      <SELECTEDITEMSTYLE BackColor="#008A8C" ForeColor="White" Font-Bold="True">
      </SELECTEDITEMSTYLE>
      <AlternatingItemStyle BackColor="#FFFFC0"></AlternatingItemStyle>
      <ITEMSTYLE BackColor="#EEEEEE" ForeColor="Black"></ITEMSTYLE>
      <FooterStyle Font-Bold="True" ForeColor="White"  BackColor="#B50055"></FooterStyle>
      <ItemStyle VerticalAlign="Top" BackColor="#FFF7E7"></ItemStyle>
      <HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#B50055"></HeaderStyle>
                <Columns>
               <asp:BoundColumn DataField="ServiceID" HeaderText="Service ID"></asp:BoundColumn>
               <asp:BoundColumn DataField="ServiceName" SortExpression="ServiceName"
                                   HeaderText="Service Name">
                        </asp:BoundColumn>
            </Columns>
      </dbwc:HierarGrid>&nbsp;
</form>
Where do I insert the Template Collumn ? The Plus and Minus images are not displaying. I see no code that detects firing of the Plus and Minus buttons.

Thanks,

Dovberman
      
0
Dovberman
Asked:
Dovberman
1 Solution
 
SystemExpertCommented:
hi ,

See this link ,
In this sample they have give functionality that you want

http://www.societopia.net/samples/HierGrid.aspx


Thanks
0
 
DovbermanAuthor Commented:
The example is impressive. However the src files needed to complete the solution are missing.

<%@ Register TagPrefix="Societopia" tagName="ChildGrid" src="DataGrid_Hierarchy_Child.ascx" %>
<%@ Page Language="C#" AutoEventWireup="false" src="DataGrid_Hierarchy.aspx.cs" Inherits="Societopia.Samples.DataGrid_Hierarchy"%>
<%@ Register TagPrefix="Societopia" tagName="PageHeader" src="PageHeader.ascx" %>
<%@ Import namespace="System.Data" %>

Thanks anyway.

Dovberman
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now