1 What is the HierarGrid

The ASP.NET DataGrid is a popular control for displaying tabular data, with editing, paging and sorting capabilities. However, this is only suitable for displaying single DataTables - there is no support for master-detail views using parent-child relations.

I have created a custom control called HierarGrid (that derives from the standard ASP.NET DataGrid) and a custom DataGridColumn called HierarColumn.

The HierarGrid takes a DataSet containing relations between tables as its DataSource.

While iterating over the parent table, it checks the related tables for child rows, and if one is found it dynamically loads a template for the child row(s).

The template is rendered invisibly into the custom HierarColumn and when the user clicks the plus icon, the template's content is copied via JavaScript into a newly created TableRow.

2 Where can I download the HierarGrid

Please also note the demo that I created, which can be downloaded from the same location. The following explanations are mainly based on, and refer to this demo.

The HierarGrid can be used and distributed at no charge in non-commercial and commercial projects. However I am happy to hear about any feedback, suggestions, improvements, criticisms, etc.

3 How to use the HierarGrid

3.1 Loading the data into a DataSet

The .NET Framework offers multiple ways to load data into a DataSet. One possible way is to use a SQLCommand to run a SQL query against a table in MS SQL Server. In my example, I used the "Pubs" database, a sample Database of Microsoft SQL Server. I created three SELECT statements that returned a list of publications, the associated authors and the sales in separate tables. The resulting DataSet can be written to a XML file using the method ds.WriteXml. The XML file is contained in the sample application as Testdata.XML, which can be downloaded from the link above.

To load the sample data yourself add two Views and a stored procedure into the "Pubs" database with the following three SQL statements:

3.2 Binding the Data to a standard DataGrid

Alternatively to the steps mentioned in the section above, you can download the sample project and use the Testdata.XML file. This file can be loaded into a DataSet and bound to a standard DataGrid with only a few lines of code.

If you had not already done in step 3.1 create a new WebApplication and drop a new DataGrid from the toolbar onto the webform and call it DG1. Otherwise skip the next few lines and continue with binding your retrieved DataSet to the DataGrid.

The following code shall be placed in the Page_Load event.

The first step is to load the data from the sample file into a DataSet or to use the DataSet generated with the code above:

The procedure so far is the normal way to bind relational data from a DataSet to an ASP.NET DataGrid and can be looked up in the .NET Framework documentation and Quickstart tutorials. Following are the changes described the HierarGrid requires to display parent-child relations.

3.3 Switching to the HierarGrid

One goal when developing the HierarGrid was to enable developers to switch seamlessly between the standard DataGrid view without parent-child relations and the detailed view with the HierarGrid.

First, reference the HierarGrid.dll in your VS.NET solution by right-clicking on References, choosing Add and selecting the DLL.

Title:
Sorting and Paging
Name:
runmd
Date:
2011-04-28 2:40:15 PM
Comment: I've figured out the DataBinder.Eval error a week ago when Does anyone moderate this feedback anymore? Dennis? I realized that I had the TemplateDataMode set to SingleRow instead of Table. After that, the child records bind just fine. My new issue is implementing the sorting and paging properties like it exists in the current sample at the top of this page. How do I implement this in the control so that if when I sort, I actually get the data to sort in ascending order and not just refresh the page and display the data in the same order as before.

Title:
DataBinder.Eval Error
Name:
runmd
Date:
2011-04-11 3:38:28 PM
Comment: I have two data tables in a dataset and a relation between the tables using the same field name. The child table name is passed to the TemplateSelection procedure and it appears that everything is kosher. I followed your example to the letter. I'm using this code as part of the text property of a label control within an ascx file that has the same name as the child table: Text='<%# DataBinder.Eval(CType(Container, DataGridItem).DataItem, "CONTACT_ID") %>'

This is the error that I get:DataBinding: 'System.Data.DataSet' does not contain a property with the name 'CONTACT_ID'.

I know the data is in the dataset, but maybe it's not the right table and most likely is a syntax issue. How should I go about fixing it if it looks right so far.

Title:
To select different templates on condition
Name:
Shagy
Date:
2011-03-31 4:04:48 AM
Comment: Hi,I am using 3 level hierargrid.But i want that for perticular condition it should show third level control at second level

Title:
Applications Developer
Name:
Margaret Gaster
Date:
2011-02-07 4:12:50 PM
Comment: I'm converting a Visual Studio application from 2003 to 2008. The HierarGrid worked correctly in 2003. Now, I continue to get "UserControl could not be loaded: _controls_price1.ascx" when I use either the page indexing feature or the Sorting feature. Can someone help out with this situation?

I am using HierarGrid grid .When it load at first time the + (expand) button is not work.If we reload/refresh the page it works fine.Can anyone suggest any thing?

Title:
StackOverflowException
Name:
Valen
Date:
2010-07-16 3:48:58 PM
Comment: I'm also having the same StackOverflowException problem that Antonio mentioned below, but your reply to him was to handle it in e-mail, so no solution is provided in the comments.

I'm using a DataGrid for the child data, and using C#. I've added the OnInit overrride, etc.

Title:
PAGIN PROBLEM SOLVED
Name:
Anvar Sadath
Date:
2009-10-08 12:29:03 PM
Comment: I found what is the reason paging is not working. After changing the pageindex , you need to call the binding method once again. Call the binding method means the method which you used to lead the grid upon call.

Title:
responding to click event of a button in child grid column
Name:
sasha
Date:
2009-02-18 3:04:32 PM
Comment: hi,I included a button coulmn in childgrid . I want to update text in a texbox by one of the fields in child grid row when a button from that row is clicked. How to access the click event of these buttons?

thanks,sasha

Title:
want to use hierarGrid in windows C# application .net 3.0
Name:
Kirti Gupta
Date:
2009-02-02 11:52:52 PM
Comment: Hi, I want to use a hierarchical grid in my windows based .net 3.0 application, can u help me in using the same component in windows form or any other grid component available.

Title:
Expand button(+/-) to be shown in second column
Name:
MindinCode
Date:
2009-01-16 5:37:26 AM
Comment: Could it be possible to show the (+/-) buttons in the Second column of grid against the different data rows?Any help regarding this would be greately appreciated.Thanks

Title:
unfortunably, this doesnt work in ie7...
Name:
kabalkunz
Date:
2008-12-10 6:55:13 PM
Comment: i am using this excellent aproach of the hierarchical grid in asp net 2008 and works great running on ie6. but if you try to run it on ie7... voilá... the detail-grid is not accesible... can you give an advice about it please? thks

Title:
Expanding of Datagrid
Name:
Skapie
Date:
2008-12-10 8:40:22 AM
Comment: I'm using HierarGrid in a updatepanel. First time I use Hg1.RowExpanded.ExpandAll(). No problem. However, when I reload the datagrid with new data, the datagrid stays in collapsed mode, even if I call "ExpandAll()". How can I get the DataGrid to stay expanded after I've reloaded with new data? Thx

Title:
GridView Instead of DataGrid
Name:
Tiger
Date:
2008-11-10 8:27:19 AM
Comment: Great Stuff.Thanks Am using the provided dll and all is working fine as documented. However, just wanted to findout if i can use a GridView instead of dataGrid?

Thanks for the great article.I implemented your concept by using the compiled dll from you.I have just modified the child grid as per my need by doingDataRow[] childrows;childrows = ((System.Data.DataRowView)((((DataGridItem)this.BindingContainer).DataItem))).Row.GetChildRows("Agency_Clinics");

and assigning this rows to a new datatable.But I am not getting the +/- icon. Can you just tell me what to do for that.One more thing that as you wrote in your article, am not able to convert

Title:
HierarGrid Multi Field Edit
Name:
Jon Steege
Date:
2008-09-19 12:53:39 PM
Comment: Is there any chance to see a solution to Mobie question on the HierarGrid Multi Field Edit, i am having the same issue.

Thanks!

Title:
Help with access controls in the child template
Name:
JB
Date:
2008-09-17 9:42:04 AM
Comment: Could you help me out with accessing the child template. I've implemented the code on your site on how to access the child template inside the child gridview using the rowediting event.The problem is the codes has to reside inside the user defined template. How do I retrieve the results of the selected primary keys of the parent and child gridviews?

Title:
To Deepak
Name:
Daniel
Date:
2008-07-18 11:05:59 AM
Comment: You need to create the event and add the grid as a listener.

See Section 3.7 Using the TemplateSelection event

Title:
Coming back
Name:
AR
Date:
2008-07-15 12:43:23 AM
Comment: Hey Dennis, The first time my HierarGrid page loads and works beautifully. I browse various pages from my first page and come back to this page and I click on the (+) icon and it doesnt have child rows. It is because ascx page doesnt bind the child records. When I debug this my debugger comes to this.DataBinding += new System.EventHandler(this.BindList);and escapes.. Doesnt actually go into the BindList function to bind child rows..Why is it???

I still don't understand where is the location of:"#region Web Form Designer generated code" to put the following code:this.HG1.TemplateSelection += new DBauer.Web.UI.WebControls.HierarGridTemplateSelectionEventHandler(this.HG1_TemplateSelection);

cause I always got an error message when I built my apps:"Error A get or set accessor expected"

Title:
Please use the event "TemplateSelection" to specify which template to load for a child table/row
Name:
Deepak
Date:
2008-07-03 6:40:34 AM
Comment: I am getting following error when I am trying to bind to grid

"Please use the event "TemplateSelection" to specify which template to load for a child table/row "

Title:
Editing
Name:
Jacob Ostop
Date:
2008-06-13 10:28:26 AM
Comment: I have a question. I am trying to make the region in the template selection editable. like if they click the little button and it shows the description field i want to have a user be able to click an edit button and to make fixes/changes. would you be able to help me with that

Title:
Mr.
Name:
Dhamodaran Vajiravelu
Date:
2008-06-11 5:29:25 PM
Comment: get the following message when I try to bind to the grid:

Please use the event "TemplateSelection" to specify which template to load for a child table/row Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.WarningException: Please use the event "TemplateSelection" to specify which template to load for a child table/row

##########################################I think this is the perfect control for what I need I just can't get it moving

I know this isn't a forum but if any one can help I would appreciate.

Please help damo777_143@yahoo.com or spp7dkv@ups.com

Title:
Please give me full source code to display related records
Name:
Nidhi Agrawaal
Date:
2008-06-04 3:44:27 AM
Comment: Sir,I want to display records of two related tables (MS ACCESS ) into VB.NET form, but i don't know how to make a connectivity for related tables. I want to show records in a Datagrid ? plz. advice me to how i do that ?

Title:
Export
Name:
Sweety
Date:
2008-06-03 12:57:06 AM
Comment: Thanks heaps Dennis. Refered to your reply and got my grid working. I read in the posts that you cant export the data as it is to EXCEL. Do you have any magical methods to export the HierarGrid data. Even a simple version with no formatiing will do. Ta

Title:
To Sweety and Adrian
Name:
Denis Bauer
Date:
2008-05-25 12:01:57 PM
Comment: The question has been asked before. Please scroll down a bit to find my answer which points to the following blog post: http://www.denisbauer.com/weblog/WhyDoesTheDataItemOfMyHierarGridContainADataSetInsteadOfADataRowViewOrViceVersa.aspx

HTHDenis

Title:
Unable to cast error
Name:
Adrian Hondema
Date:
2008-05-23 1:25:16 PM
Comment: I run into the same problem as Sweety in the previous post: Unable to cast object of type 'System.Data.DataRowView' to type 'System.Data.DataSet' in the ascx file. Is there a solution to this problem?Thanks in advance.

Title:
Can this works for WindowsForms
Name:
Julio Ponce
Date:
2008-04-23 11:32:14 AM
Comment: HEllo Denis, nice work u done with HierarGrid, I'm New to .net and I'm traying to manage a Master/Detail WindowsForm, have any Idea how can I acomplish this, or some url u can redirect to ???,Best regards,Julio Ponce

Title:
To Mark
Name:
Denis Bauer
Date:
2008-04-03 10:06:01 AM
Comment: I am not aware of anything you have to do specially to support more than 3 levels. What is the error message you are getting. Please send me an email.Denis

Title:
4 levels deep with the HeirarGrid?
Name:
Mark
Date:
2008-03-30 9:29:46 PM
Comment: Hello Dennis - used your control a number of times in the past with great success. This time, I want to nest the sucker 4 levels deep - each level being a child of the parent. Not sure why it fails on the third level on me - do I have to apply a filter somehow? I am setting the compund keys up in the dataset across all four tables...anyone ever nest it this deep before?

Its work finebut how to get server event for child controls in Hierarchical grid,when i tried with bubbleclick event it throwing error

Title:
Binding Parent Fields in Child Templete
Name:
Austin
Date:
2008-01-01 4:42:58 AM
Comment: hello DenisThanks for the control but i have some issue, I need to show fields from the parent table in child template

for filling child we useDataBinder.Eval(((DataGridItem)Container).DataItem, "au_lname")

Title:
PAGING
Name:
developer
Date:
2007-12-04 1:46:38 PM
Comment: CAN ANY ONE TELL ME Y MY PAGING IN NOT WORKING? I CAN SEE PAGE NUMBERS AND MY PAGING OPTION IS TRUE, BUT I CANT GO TO THE 2, 3 ... PAGESANY HELP

Title:
How to Bind with Objects?
Name:
Matt
Date:
2007-11-26 5:11:03 AM
Comment: I have found your HierarGrid and it is perfect for the application I am currently developing. However, I have my own business objects (generic collections to be precise), could you give me some advise on how I can use them to populate your control, rather than a DataSet. Particularly how to create the DataRelation.

Title:
Paging not working
Name:
Max
Date:
2007-11-22 2:02:24 PM
Comment: Has any body have solution why the paging is not working? I can see the page numbers but the grid doesnt load the second page when you click on 2

Title:
HG not working on Firefox and IE 7
Name:
Developer
Date:
2007-11-16 1:12:41 PM
Comment: Using HG into ascx control does not work in Firefox AND IE 7

Title:
Datagrid filter
Name:
Sam
Date:
2007-11-05 2:20:43 PM
Comment: Hello Does any body know how we can filter the HierarGrid using search opption on client side? I want my grid to be redrawn on client side using that search

Title:
Another one based on GridView
Name:
Jim
Date:
2007-10-20 6:44:37 PM
Comment: Same idea, but based on ASP.Net's GridView

http://www.digitaltools.com/GVT.aspx

Title:
HG used in ASCX in Firefox
Name:
Fred
Date:
2007-10-14 4:07:29 AM
Comment: Hi, Using HG into ascx control does not work in Firefox, it appears does not fire the event or javascript problems

rgds

Title:
developer
Name:
developer
Date:
2007-09-19 1:50:44 PM
Comment: Does any one know how we can find out which child row I am in? i have button inside the template (not in the grid columns) and want to know which child template that button clicked from?

Title:
developer
Name:
developer
Date:
2007-08-27 5:37:01 PM
Comment: Is it possible to create relation in tables using two different col so i can get unique row with most matching

Regards

Title:
To Developer
Name:
Denis Bauer
Date:
2007-08-27 12:46:36 PM
Comment: Yes, this site is very alive. Regarding your question please check out just the post before yours where I point to the FAQ on my blog. There you find an article about HierarGrid and columns: http://www.denisbauer.com/weblog/DefiningTheColumnsInTheHierarGrid.aspx

Title:
developer
Name:
i_am_develop
Date:
2007-08-23 11:50:59 PM
Comment: Does any body know how to set the column header text for the column where we have +/- images?

Thanks

Title:
To ShamShuddin and developer
Name:
Denis Bauer
Date:
2007-08-23 1:29:13 PM
Comment: Basically, same answer to both of you: Just like in the regular DataGrid. The HierarGrid inherits from the DataGrid and therefore you can pretty much use the same techniques for it.

To hide or customize the columns check out this blog post: http://www.denisbauer.com/weblog/DefiningTheColumnsInTheHierarGrid.aspx

To make a row clickable there are a couple of either client or server-side solution. Please search for "clickable row datagrid" or check out the TemplateColumn.

I try to collect a couple of frequent questions on my blog in the HierarGrid category:http://www.denisbauer.com/weblog/CategoryView,category,Software,ASP.NET,HierarGrid.aspx

Denis

Title:
developer
Name:
i_am_develop
Date:
2007-08-23 1:17:57 PM
Comment: Hey Angelo Cajipe Did you get the answer, how to make row clickable?

Also, does anyone know how to hide the column? Basically i want to hide those columns which I am using for relation b/w parent & child table?

i use your control, but how to assign paging to child grid.page numbers are showing correctly , but it is not going to second page.

Title:
nested grid
Name:
jan
Date:
2007-08-13 5:24:19 AM
Comment: its excellent,but i found error when i get parent row multiple. like error is "A child row has multiple parents". so i will be thankful if you posted this.i have given relation t data key, that iam getting twice, so that time iam facing above error.thank you

Title:
devloper
Name:
Angelo Cajipe
Date:
2007-08-13 2:16:44 AM
Comment: How can i make the parent row table clickable instead of just the plus/minus sign?

Title:
Developer
Name:
mina
Date:
2007-07-29 12:12:30 PM
Comment: It is Very Very Good artical

Title:
Searching through the Parent Table
Name:
Imran
Date:
2007-07-19 2:06:31 AM
Comment: I tried searching on the parent Table Authors ... i was trying the NestedHierarGridDemo. But When i send the querry it sends backs the record.. But the grid does not shows it..

After sometime when i removed the relationship of the dataset.. it showed over the grid.. but there was no drilldown + sign.. coz of no relationship..

I think there is an example of filtering.. but it is not a valid link.. coz when i click there is not response...

I've got a WebApp using this in .NET 2.0 developed in Studio 2005 and tested both of your scenarios in the template (ASCX) codebehind page:---------DataGridItem dgi = (DataGridItem)this.BindingContainer;DataSet ds = (DataSet)dgi.DataItem;//Above two lines accomplish same thing as below.DataSet ds = (DataSet)((DataGridItem)this.BindingContainer).DataItem;---------Both statements work fine in my environment. Using ASP.NET Version 2.0.50727 (in IIS site properties).

What version is showing for you? Also, what are your TemplateDataMode and TemplateCachingBase set to on the "parent" HierarGrid (ASPX) page?

Title:
datagrid as a child control
Name:
Jim White
Date:
2007-06-25 3:30:30 PM
Comment: It seems that this grid does not work well in 2.0. I had no problem getting it to work in 1.1 however, the following code return a null value when used in 2.0.

DataGridItem dgi = (DataGridItem)this.BindingContainer;

Any help would be greatly appreciated. Again, I only have problems within VS 2005. Thanks.

I really appreciate your efforts on creating a very useful custome control. I am using your control in one of my projects and having little trouble. I have two hierargrids in one user control and one of them has a button inside the child grid. When a button is clicked, I want to show the other hierargrid under neath. For some reason, raising an event using delegate method didn't work out. Any help would be appreciated. Thank you.

Title:
Not displaying data in child grid
Name:
Anu
Date:
2007-04-11 3:45:23 PM
Comment: I am using your grid for one of my projects, it works fine if I use Text box to display child data but when I replace text box with grid, it doesnot display any data. I am not creating data relationship manually since my xml is well formed for relational data.

please take a look at my blog post: http://www.denisbauer.com/weblog/TroubleshootingHierarGridPlusminusIconProblems.aspx

My email address is also listed on my website.

Maybe that helps.Denis

Title:
Not displaying +
Name:
CCK
Date:
2007-04-01 11:17:04 PM
Comment: Hi Dennis,I noticed that you asked the person who wrote the following to email you directly. I'm having the same problem but don't know your email.

"I'm trying out the HirarGrid control and I think its great!However I can't get the child table and [+] images to display.

I've used another datagrid to display childrows,its not breaking the code, just xs in the + images and when I click on where the images should be it dropdown slightly with nothing in the child table datagrid"

Title:
Mr
Name:
Sri
Date:
2007-02-20 12:21:46 PM
Comment: Hi DenisThe HierarGrid is great.I am trying to use it. Your sample, when I tested with text boxes in the UserControls, is working great.I replced the text boxes with Grids and set the property TemplateDataMode if HG1 to Table and added the code to Page_Load of usercontrol code behind. When I ran the app. I just see an empty row being displayed when I click the + sign.Can you please let me know where I am going wrong?Thank youSrisribun12@yahoo.com

in general that shouldn't be a big problem but you'd have to change the HierarGrid source code. Internally, it is using Page.LoadControl(filename) to load the child templates.

HTHDenis

Title:
Possible without child ascx pages?
Name:
Troy
Date:
2007-01-20 6:45:07 PM
Comment: First off, this is a GREAT control. Is it possible to it without individual child ascx pages? I wanted to call it from a custom control and write the templates as needed for each level depending on the number of relationships in the dataset. Thanks in advance for any advice.

Title:
Headers for the child table?
Name:
Al
Date:
2006-12-06 6:40:57 PM
Comment: Is there a built in feature that would allow display headers for the child table as well?

Also, if the grid to be used with ASP.NET v2.0 text need to be amended (e.g [3.6 Creating a child template] event wiring is different in 2.0 and [3.7 Using the TemplateSelection event] should declare event hadling routine as [protected] instead of [private]).

But overall these are small things, the grid is great, and works just fine. Thank you!

P.S. I am still struggling using gridview to display child data; any help would be appreciated.

Title:
want to get the row that was selected by the user
Name:
m ali farooq
Date:
2006-12-01 3:04:42 AM
Comment: hi i am doing some thing like this when user click on + the an new template is loaded and when use click on that use button(submit) i have to remove that line with out refress can any one help me with this

Title:
Super control...
Name:
zoestt
Date:
2006-11-30 4:29:47 PM
Comment: This control..is wicked.. Thanks. You have done a great service to all who hate embedding a Datagrid in a Datalist.

Title:
Mr
Name:
George
Date:
2006-11-16 7:12:02 PM
Comment: HiI'm trying out the HirarGrid control and I think its great!However I can't get the child table and [+] images to display.

I've used another datagrid to display childrows,its not breaking the code, just xs in the + images and when I click on where the images should be it dropdown slightly with nothing in the child table datagrid.

The DataSet contains 5000 records and I am displaying 1000 records per page. When I tried to sort on a Column, it hangs or no repsonse.

It also doesn't give any error/exception. The process became endless most of the times.Hoever,it works fine when I tried to use with less number of records per page.

It also works fine when I used with my local DB with 1000 records per page.

Can you suggest how to find out the error?

Best regards,Pankaj Bansal

Title:
Mr
Name:
Arun Kumar T
Date:
2006-10-12 12:42:46 AM
Comment: Hello SirI am Arun Kumar from chennai INDIA. Saw your profle got impressed the way you reponse to the people queries. Sir, Basically my role defined as Senior Usability Engineer. But i have some problem in creating components, I do research on the product architecture and functional architecture before i start developing the prototype of the product UI. Is there any other stuff i should know in the field of UI or need to develop knowledge in the platorms or programming codes. Can i get any sample components related to UI similar like [Ajax or something]Please help me how to fulfil my role

for questions about the standard ASP.NET DataGrid please refer to the ASP.NET Forums at http://forums.asp.net.

Denis

Title:
Datagird event
Name:
Nimesh patel
Date:
2006-10-09 9:31:38 AM
Comment: hello sir i want to know that when i am putting dropdown list in datagrid how can i got the cahged event of this dropdown control event onchange i want to open textbox in another column if u can give me reply on nim_00in@yahoo.co.in

which of the samples are you referring to? Please write me an email and describe the problem you are facing.

Denis

Title:
Paging the child hierargrid
Name:
Erika
Date:
2006-10-04 2:36:04 AM
Comment: I was testing your nested hierargrid on a new project when I had a problem with the paging of the nested grid. So I tried again your demo changing the Paging Size of the nested grid to 2 to prove the paging.It didn't seem to work (the page index changed but the grid didn't show the second page of titles of the selected author).Many thanks for your work: it is very very good and well explained.So, I hope you can answer me soon.....

Title:
Mrs.
Name:
Geetha
Date:
2006-09-25 2:42:37 AM
Comment: I am trying out your control in my project.so is that enough to only add the HierarGridDLL to my project.

I’ve had a little trouble getting the fix code to work. Is it possible you could give me an example loop syntax? I’m a little confused about how it will handle the auto generated panel, etc ID’s and how to make it iterate through all the levels. Lastly, I’m not sure how and when to cast the result as a TextBox to retrieve the value from the template columns.

unfortunately, it is not as easy as I would like it to be. Please check out my blog post for the FindControl syntax:http://www.denisbauer.com/weblog/NewHierarGridVersion16.aspx

HTHDenis

Title:
HierarGrid Multi Field Edit
Name:
Mobie
Date:
2006-08-11 4:52:13 PM
Comment: First, great job on creating the HierarGrid--it has really been of great help.

I am trying to do a multi layer, datagrid edit.

I have 3 levels (3 tables) and 1 plus icon for each. I expand all on load and have the editable field setup as a template column/text field. My goal is to allow the user to update the parent and child fields on all 3 levels at the same time. (VS line by line.) Once the changes have been made, I have a button to "Commit All Changes."

I have no problems doing this on a single level datagrid. Now I'm just trying to find a way that I can loop through the child rows and save them to the database as I do with the parent.

Below is how I loop through the parent datagrid and store the results in a datatable.

i cant get data at dgi.DataItem is set to nothing allwaysor DataBinder.Eval(CType(Container, DataGridItem).DataItem, "au_lname")this statement will not work correctlyplease suggest me help realted to this

thanks ,kirankiran.bhandare@rheal.com

Title:
Is it Paging and Sorting, possible in nested approach.
Name:
Arun
Date:
2006-08-01 2:13:07 PM
Comment: Hi,Excellent control. was very helpfull with my work. Thank you very mcuh.Have a question ? Paging doesnt seem to work when used in Nested mode, in the inner Hierargrids. When the i hit the page numbers, actually the control looses the state, i.e all the rows collapse. Any idea why this happens ?

you can reach me at mailarunv@yahoo.com

thanksarunv

Title:
MR
Name:
ravi
Date:
2006-07-20 8:19:50 AM
Comment: I am getting an error namespace databinder not found(missing using directive or assembly).. when i am trying to insert data into datalist from database

Title:
Checkbox sample
Name:
Stephen
Date:
2006-06-22 5:54:08 AM
Comment: Hi, can provide a full sample using checkbox in your grid, i cannot seems to get this working, im trying to get the values selected on the child table, please help

REgards,Stephen

Title:
KJ
Name:
Kashi
Date:
2006-06-15 5:46:47 AM
Comment: when i try to run test application its raise EXCEPTION"The base class includes the field 'HG1', but its type (DBauer.Web.UI.WebControls.HierarGrid) is not compatible with the type of control (DBauer.Web.UI.WebControls.HierarGrid)."

Title:
it works now, wonderful
Name:
pishi
Date:
2006-06-01 2:16:05 PM
Comment: I have a friend named Ahmad(he is software engineer in salt lake city), he told me to look at the demo source, I did and I could find my problem.Million thanks to Denis and my dear friend Ahmad

Title:
System.NullReferenceException: Object reference not set to an instance of an object.
Name:
pishi
Date:
2006-06-01 11:13:19 AM
Comment: I added this to child page which is user control but I get null; or System.NullReferenceException: Object reference not set to an instance of an object.please let me know what is the problem

no that shouldn't be a problem. In this case it seems that the HierarGrid cannot load the JS file that is an embedded resource. Did you include the source code or are you using binary references? Please send me the response via email.

Title:
Help
Name:
Farrukh
Date:
2006-04-18 5:16:24 PM
Comment: Sir i have designed a child template. It is a user control and i have dropped a datagrid over there and Binded it as stated above but it is not working.Child rows are not getting filled.The dataset in the user control is empty.Plz help as soon as possible.

farrukh_ms@hotmail.comRegards

Title:
Mr
Name:
Patrick
Date:
2006-04-16 3:49:07 PM
Comment: This is an exceptional piece of work and you are to be commended for letting others benefit from your code! Just downloaded your latest version and it fixed a problem I was having with the previous version: 'Unable to load user control' when populating the second table. It worked fined on XP but failed on Win2000 Server. The new control solved the problem with no code changes required on my part. Thanks!!!!!

Title:
Child Paging
Name:
Rafael
Date:
2006-03-29 3:13:14 PM
Comment: I'm working with a 3 level hierargrid. The first grid is working just fine with the paging set TRUE. But i'm trying to do the same with the child grid and it's not working.Have any ideas why is that happening?

Title:
Using HierarGrid without the DLL
Name:
Satyajit
Date:
2006-03-21 7:37:25 AM
Comment: Hey Denis...First of all let me congratulate you for a great job. HierarGrid makes life a lot easier. I have got a query. I have sucssefully used the HierarGrid DLL to display information in my project. However I want to add the source code inside my project rather than referring to the dll. Can I do it ? What all things I will have to keep in my mind if I copy all the source code inside my project ? Please suggest.If anyone has done it then please share the information with me.Congrats again for a nice job.Thanks in anticipation !

Title:
The type or namespace name 'HierarGridERROR: TemplateSelectionEventArgs' could not be found
Name:
Kristen Hazard
Date:
2006-03-02 1:59:56 PM
Comment: After implementing the TemplateSelection event I got the following error when I tried to build my project.

The type or namespace name HierarGridTemplateSelectionEventArgs' could not be found (are you missing a using directive or an assembly reference?)

I was able to fix by adding the following line to my C# file:using DBauer.Web.UI.WebControls;

all available samples are on my website. Please understand that I cannot create extra samples for individual use cases.

Denis

Title:
Hierarchical Datagrid in asp.net
Name:
Manoj
Date:
2006-02-13 12:54:44 AM
Comment: hello sir, Can u help me out.I am trying to build a hierarchical web grid code behind vb.net using Nhibernate.I have successfully done the relationship but the problem is to display child grid in 2nd row i.e if the first row is parent.now it is showing child and parent in same row.Please help me with the code or example

Title:
edit HierarGrid
Name:
Carlos Malagón
Date:
2006-02-12 12:30:36 AM
Comment: Hi, i'm try to use the HierarGrid to edit rows, but my HierarGrid has many levels, when i try to edit i lost the edit row, i think that the HierarGrid lost the row upper.

My hierargrid is set up so that the last 8 columns of both the parent and child grids contain the exact same set of data. I have been trying to get these columns to stay perfectly aligned when the child grid is displayed (i.e. parent and child column widths are the same). Any idea how that can be accomplished? Thanks.

It's me again. The Hierargrid on my application is working really well now. I just noticed something unusual.

If for example, I expanded the first row on the first page of the grid and then I go to the next page of the grid, I noticed that the first row on the 2nd page is also already expanded when it is loaded. Same as with the first rows of the other pages. I have implemented paging for the grid and I have set AllowCustomPaging to false.

Last question (I think) - in order to recompile, do I have to add all of the existing files in HierarGrid to a new project and then build? Or is there another way to recompile the dll by itself? Thanks again.

Bob

Title:
@Bob
Name:
Justin
Date:
2006-01-31 2:35:28 PM
Comment: Bob,Yes you will need to recompile the .dll and make sure your newly compiled dll is in the project you are having the issue with.

I tried replacing line 154 with your sugggestion and I still get the error. Do I have to recompile the dll for the hierargrid? I also tried "swapping" the two lines you listed and had no luck either. Any additional guidance? I'm know I'm making this harder than it needs to be. Thanks.

The email address info@denisbauer.com comes back as rejected for me for some reason (something about foreign mail servers). Anyway, I am running my page using the 1.1 framework, so I don't think it is limited to ASP.NET 2.0. If there is anything I can help test, please let me know. Thanks.

Title:
To Bob
Name:
Denis Bauer
Date:
2006-01-31 11:13:13 AM
Comment: There still seems to be a problem with ASP.NET 2.0 which I haven't found yet. Please contact me via email so we can work on this issue.

I have been programming with ASP.Net web apps for about a month now. So being the rookie that I am, it took about 3 days to get the HierarGrid to work. But now that I have it working, I must say, Good Job to you Mr. Bauer. Thank you!!

Title:
How to assign edit textbox field ?
Name:
Kenster
Date:
2006-01-23 6:28:57 AM
Comment: Hi Denis Bauer, Yr control works great..thumb up for it. However right now i trying to incorporate editing features into the control and is facing some errors. I code as :

'To get first field in textbox to assign it to tempdim temp as textbox = e.item.cells(0).controls(0)

However i got the error msg...Hope u can help me..Thanks again bro.

Specified argument was out of the range of valid values. Parameter name: index

Title:
On + click need to Add Child DataGrid
Name:
Nitin
Date:
2006-01-19 12:11:58 PM
Comment: First of I thanks to you, this control help me lot.

As now all three levels are added at Page Load time. I have needed some Advance functionality. I want to add child Grid at + click and same for the third level. It can possible with this control.

the control source is available on my homepage and you shouldn't need to change anything for the basic scenarios that are described in my sample apps.

HTHDenis

Title:
some refinement required
Name:
manish punwani
Date:
2006-01-02 7:12:33 AM
Comment: The Control is really excelent!!!!!!!But in user control instead of label i wanted that particular record in a datagrid. the data appears in the grid but not of respective record. I suppose some coding needs to be done in the webcontrol. but as the source is not available thats why it seems not possible.pls revert manish.punwani@e-pspl.com;mpunwani@gmail.comrgdsmanish

please take a look at my blog to find out how to debug "my child records don't display" issues:http://www.denisbauer.com/weblog/TroubleshootingHierarGridPlusminusIconProblems.aspx

ThanksDenis

Title:
Mr.
Name:
sanjay
Date:
2005-12-27 1:19:13 AM
Comment: i have used heirargrid i works fine and very usefull in many applicationstill i found some problem i made the relation as shown Dim cn As New SqlConnection("uid=sa;pwd=sa;initial catalog=EmployeeDB;data source=comp4") Dim s, s1 As String s = "Empview" Dim ds As New DataSet Dim com As New SqlCommand com.Connection = cn com.CommandText = s com.CommandType = CommandType.StoredProcedure

Title:
To Denis
Name:
HideColumn question
Date:
2005-12-20 6:46:48 PM
Comment: Thanks for the quick reply and the link to the FAQ. That's excactly what I wanted and I was able to rename/hide columns after reading your FAQ.Thanks again,Ravi

I've posted the FAQ in my blog under the following category http://www.denisbauer.com/weblog/CategoryView,category,Software,ASP.NET,HierarGrid.aspx

HTHDenisThanksDenis

Title:
How to hide a column in the Parent table
Name:
Ravi
Date:
2005-12-20 11:50:51 AM
Comment: Hi Denis,Thanks a lot for the cool grid.I was wondering if there is a way to hide a column from the Parent table. For example, in your demo, TitleID is visible, is there a way to hide it?.ThanksRavi

Just one more question. I've got this requirement to gray out the checkbox on my parent grid when one or more checkboxes from the child grid is unchecked. Any suggestions on how I can access or call the checkbox from the parent grid when I'm in the child grid?

please take a look at the answers I gave to Neeraj and JK. Sometimes IE doesn't seem to be able to handle the amount of data that is rendered. My recommendation is to split up the data with paging or filtering.

This is really a great control, it helped me a lot with the current application that I'm working on. Thanks so much! =)

Just one thing though, when I already used a large amount of data and clicked on the "+" icon, an explorer error occured (iexplorer.exe - Application error).

I would greatly appreciate any inputs or ideas on how this error can be resolved.

Thanks again.

Regards,

Maureen

Title:
HieraGrid and ASP.NET 2.0
Name:
tgc
Date:
2005-11-24 1:28:44 AM
Comment: Has anyone used the HieraGrid with ASP.NET 2.0? I need a control just like HieraGrid for a project I am working on, but i'm developing with VS.NET 2005...or is there built in support in .NET Framework v2.0 for this?

I have 2 issues i haven't been able to solve yet, if anyone can help, it would be greatly appreciated.

1. While i've implemented sorting on the Hiergrid, i cannot implement sorting on the nested grid - has anyone seen this done ?2. I can't get the Hiergrid to work when the pages aren't in the root folder of the website - a minor inconvenience.

please take a look at section 3.7 that explains how to wire up the TemplateSelection event:this.HG1.TemplateSelection += new HierarGridTemplateSelectionEventHandler(this.HG1_TemplateSelection);

Denis

Title:
Please use the event "TemplateSelection" to specify which template to load for a child table/row
Name:
Raymond
Date:
2005-10-23 8:41:26 AM
Comment: I am trying to do this using Web Matrix. Basically i have a Main.aspx form and a template called Authors.ascx

The error that i'm getting is:System.ComponentModel.WarningException: Please use the event "TemplateSelection" to specify which template to load for a child table/row

Hey, this control just made my life whole lot easier. Just one question. My parent grid contains a child grid with a template column containing a check box. How would I itterate through all child grids to get a collection of selected rows?

Title:
Great Control, only if...
Name:
Marcello (marcello.piraino@nc3a.nato.int)
Date:
2005-09-23 8:08:42 AM
Comment: Denis,what you've done is just great; however, following the instruction published in the article you wrote with PaoloI was able to get nothing more than a grid which displays an empty right column (no plus sign) besides the others. What have I done wrong?

Let me start by thanking you for such a user friendly control. I would like to control the width of the HierarColumn. I have used the HierarColumn tags as you describe in your tutorial. However, the column does not show when using this method. The tag with no additional configuration does not work. Can you point me in the right direction? Thank you in advance for your help.

Cheers,

Moises Florezmflorez@willkie.com

Title:
getting error when trying to get an Event Handle from the User Control into the main
Name:
Vinay Kr. Chowdhary
Date:
2005-08-29 2:13:26 AM
Comment: Thnaks denis ,I found this article very much usefull for all developers using datagrid. can u send me the solution for this funny error, The type or namespace name 'HierarGridTemplateSelectionEventHandler' could not be found (are you missing a using directive or an assembly reference?)my Mail: vinay.chowdhary@d-channel.com, vinay_chowdhary@yahoo.comThanks in Advance

Title:
@Mezzo
Name:
Denis Bauer
Date:
2005-08-23 5:03:54 AM
Comment: No, this is a WebControl. The WinForms DataGrid supports relations out of the box. Do a quick MSNSearch and you'll get a ton of results.

Denis

Title:
it is possible in window form?
Name:
Mezzo
Date:
2005-08-23 3:35:51 AM
Comment: This really cool and I hope it can use at window form.Do you have any ideas about it?

Title:
Expanded rows by default on pageload...
Name:
Suneet
Date:
2005-08-08 12:58:07 AM
Comment: Please tell me how to show expanded rows in grid on pageload so that user sees all rows as expanded.

Thanks.

Title:
Hiding Columns/Naming Columns of Child Grid
Name:
Eddie
Date:
2005-08-04 5:53:09 PM
Comment: Is there a way to hide certain columns on the parent grid? I've tried settig the property .Columns(index).Visible to False but it seems the HierarGrid thinks it is only a one column table (i.e., any index value greater than zero returns an out of range error).

I have recently been trying out your HierarGrid. It's a great control and thanks a lot!

I have modified the NestedHierarGridDemo to display a dataset with 3 DataTables and 2 DataRelations of data queried from a stored procedure. Everything works fine except when record number of the tables get large (in the order of thousands of records) , it tends to take a long time for the grid to display itself on the browser. A check on the file size of the rendered aspx page also revealed that it's huge (more than 10MB).

Is there any way that the HierarGrid can dynamically populate the data on its child grids on click of the expand/collapse button instead of dumping the data into the html all at once on page load?

Thanks

P.S. I tried your email from your web site, it returned a failed delivery message.

I am working on a project that has several datagrids with Master/Detail content. In one datagrid I have a select button where I click and want to expend several rows, then click again to collapse the records.

Sincerely,

Title:
Ms
Name:
Satish
Date:
2005-06-29 9:23:51 AM
Comment: I am using the grid for my project.I have a Stored Procedure which returns two tables.I am binding the grid to the dataset.I am didplaying the record in the first level.When i click +/- its not opening the child grid.ANy help will be appreciated.

previously i was not getting the results butthen after on the next day i got it. i wnat to use this grid in forum application but the problem is that it is showing the ids also that is what i don't want to show i want to show category name i dont know how to do that i m trying since last 4 days but i m not able if any one has any idea please mail me on my mail address

Title:
ItemDataBound
Name:
Carlos Malagón
Date:
2005-06-10 4:58:47 PM
Comment: Hi, in the template control "template.ascx" i want to control the ItemDataBound event, i have the follow instruction "this.grdDetalle.ItemDataBound+=new DataGridItemEventHandler(grdDetalle_ItemDataBound);" in the InitializeComponent procedure. But doesn't do anything.

the code snippet you pasted is exactly the code from my sample. So the problem is definitely not there. Please send me some futher info via mail.Denis

Title:
HeirarColumn at Design Time
Name:
Roy
Date:
2005-06-08 8:12:33 AM
Comment: Hi, You mention in the article that it is possible to put the HeirarColumn in to the grid control at design time (even though you add it if its not there...nice!).

Can you give me a sample of the HTML required to do this ?

Thanks

Title:
quite good
Name:
kautilya
Date:
2005-06-06 7:20:33 AM
Comment: ur control is quite good buti am not able to get access to binidingcontainer property and container property. i tried for both u specified for datagrid and textbox in ur example but for both i have problem because of bindingcontainer and container property. in datagrid ascx file i am get my dataitem empty and my dataset empty please show me solution quick .my code snippets as follows

Dim dgi As DataGridItem = CType(Me.BindingContainer, DataGridItem) Dim ds As DataSet = CType(dgi.DataItem, DataSet) If (Not (TypeOf dgi.DataItem Is DataSet)) Then Throw New ArgumentException("Please change the TemplateDataMode attribute to 'Table' in the HierarGrid declaration") End If

DG1.DataSource = ds DG1.DataMember = "Authors" DG1.DataBind()

my mail address is darshu_net@rdiffmail.comthanks

Title:
Mozilla incompatibility
Name:
@Puneet
Date:
2005-05-31 12:40:20 PM
Comment: Hi Puneet,unfortunately, that is a known issue my control has with Mozilla-based browsers. I don't have a work-around yet. If anyone goes ahead and fixes my JS file, I'd love to know how.

The problem that i am experiencing is whenever there is any postback (through paging or editing) from within the nested grid, all the nodes collapses in Mozilla (however it works fine in IE). I also experience the same problem while running your nested paging, sorting demo in Mozilla.

I had a look at the Javascript file Startup.js. I reckon u using that script on postbacks in order to maintain the state of +/- signs.

Any help will be appreciated.

Title:
SQL Error: Invalid column name 'title_id'
Name:
Clinton Gallagher
Date:
2005-05-24 11:34:54 PM
Comment: I created the views and ran them but the TestData stored procedure throws the exception as noted.

Please send me your questions and feedback via email. Address can be found on my homepage or use the "Feedback" link at the top of the page.

ThanksDenis

Title:
MENY ROWS
Name:
Carlos Malagón
Date:
2005-05-16 6:05:20 PM
Comment: I try to show a HierarDataGrid with two levels but the inner level have many rows, why the IE show slowly the data?.

Title:
NestedHierarGrid
Name:
Meera Tripathi
Date:
2005-05-14 7:25:51 AM
Comment: I have the requirement of drilling down of database till six level using Parent Child relationShip and I saw this NestedHierarGrid , Impressed but will it suffice my requirement?????

I am not able to use this more than 3 level as per shown in your sample . Could you suggest me How Could I implement your HierarGrid till six level ??? I urgently needing this...

Is there any other way to do so..Pls. Suggest...

Title:
To Steve
Name:
Denis Bauer
Date:
2005-05-11 10:42:33 AM
Comment: Please send any question to me directly via email.Regarding you question: You can use the ItemDataBound event like you described and then access the child rows by casting your DataItem to DataRowView and calling GetChildRows on the corresponding row.

HTHDenis

Title:
ItemDataBound on the children
Name:
Steve
Date:
2005-05-09 4:20:16 PM
Comment: Allow me to join the preceding thankx for your contribution both for the original control as well as your continued support here in this forum.

I'm looking to control the row color of child row based on a value of one of the children's databinder fields. In a conventional grid I'd add code to a myGrid_ItemDataBound handler. But attempting to reference a field in the child 'grid' is causing problems because that field name isn't found in the parent.

any thoughts?

Title:
To venkat
Name:
Denis Bauer
Date:
2005-05-06 11:04:51 AM
Comment: Did you set TemplateDataMode to Table as described in chapter 3.9? If that's not the problem please follow up with me via email. The address is on my homepage.Denis

Title:
unable to get the user Control DataGrid
Name:
venkat reddy
Date:
2005-05-06 8:22:42 AM
Comment: Respected Sir, iam very happy to use this Hierarchiacl DataGrid, when i Bind Data to DataGrid But One Exception is Coming.i have written one stored procedure in this stored procedure i have wriiten two Queries ,using this one iam binding the data to DataGrid,when i click "+" sign "Specified cast is not valid "exception" is coming iam unable to get the Second DataGrid,,what is the Problem?How Can i Solve This Exceptin Please help me.

that's the basic design principle of the HierarGrid. All data is rendered to the client and expanding/collapsing is done completely on the client side without the need for postbacks.

If your structure is more complicated than that it could be rendered at once, the HierarGrid might not be the best choice for your scenario. Of course, there are options to work around this by limiting the data that needs to be rendered like e.g. paging, filtering etc.

I received some emails from other people who thought about enhancing the HierarGrid with a delay-loading mechanism but I don't have a complete implementation yet and currently I don't have the time to implement it.

CheersDenis

Title:
To Denis
Name:
Neeraj
Date:
2005-04-19 7:09:44 AM
Comment: I found your Grid very useful. It is really great.

But I do have a bit different requirement. I need to bind the inner grid( in case of nested grid ) on click of the Plus Image, as the amount of data is too much. The inner grid can have about 2000 records, so it is not feasible to get all the data in one shot.

as the exception says, please use the TemplateSelection event to define the child template that needs to be loaded. That is explained in the section 3.7 in the article above and is included in every HierarGridDemo on my homepage.

CheersDenis

Title:
Hierargrid
Name:
sweetha
Date:
2005-04-06 11:50:10 AM
Comment: I get the following message when I try to bind to the grid:

Please use the event "TemplateSelection" to specify which template to load for a child table/row Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.WarningException: Please use the event "TemplateSelection" to specify which template to load for a child table/row

Title:
@Sankar
Name:
Denis Bauer
Date:
2005-03-23 11:38:17 AM
Comment: Please take a close look at the NestedHierarGridDemo on my homepage and send all further questions to me via email.

Title:
Nexted HierarGrid
Name:
Sankar
Date:
2005-03-23 9:34:02 AM
Comment: Hello,1. I set HierarGrid.TemplateDataMode=Table in mail ASPX page. before databind. I am getting this error "DataBinder.Eval: 'System.Data.DataSet' does not contain a property with the name au_lname. "

2. Then another thing i want to include the datagrid in the usercontrol instead of text/label control. If i inlude in the databindings property what should i type in the custom binding expression.For Text/Label control am using "DataBinder.Eval(((DataGridItem)Container).DataItem, "au_lname")" for datagrid what should i type.

Help me in this.

Title:
@Sankar
Name:
Denis Bauer
Date:
2005-03-23 8:24:54 AM
Comment: Different samples are available from my homepage. See the link above in section 2. The nested grid scenario is contained in the HierarGridDemo.

please take a look at section "3.7 Using the TemplateSelection event". It should be explained there. If you cannot figure it out please ping me directly. Contact is on my homepage.

CheersDenis

Title:
I get the following message when I try to bind to the grid:
Name:
sankar
Date:
2005-03-23 1:01:34 AM
Comment: Exception Details: System.ComponentModel.WarningException: Please use the event "TemplateSelection" to specify which template to load for a child table/row

It worked. What happend is I got alot of errors when I tried to copy and paste the sql create statements in the query analyzer (something about cant have group by without TOP) and so I did them one at a time and the 2 select statments didnt make it in the testdata sp.

The stored proc contains three SELECT statement thus it should return three tables in your dataset. If you want to work around this problem, you can also use the TestData.xml file and load the data into a DataSet. The file is included in the HierarGridDemo which is available on my site.

thanks for your feedback and sorry for not giving you the guidance you need to successfully use the HierarGrid in your project. I usually work in larger projects where you certainly don't just drag-and-drop your tables on the designer surface and bind it to the controls but build a solid three-tier architecture with a separate application and data access layer. That's my "real world" and I still consider myself a human being. :) Therefore, it is sometimes a bit complicated to address a very diverse audience with a single article. But that's just a sidenote.

Basically, what I am trying to point out in my article is the fact, that the HierarGrid - as all other ASP.NET controls - is programmed to be DataSource-agnostic. In other (more "human being"-compatible) words the HierarGrid doesn't care where you get your data from or how you get it. As long as you end up with a DataSet that contains a DataRelation between a parent and one/several child tables everything is fine.

If you already know how to get your data into a DataSet and setup the DataRelation (which you seem to do) just skip chapter 3.1 and continue with 3.2.

Regarding your "Initialize Component" comment: True, that this is the code that VS.NET generates automatically for you. For my article I thought it was easier to write "just add that line" instead of:Open up the webform in the designer, click on the events tab in the property windows and select the dropdown list for the TemplateSelection event.

If that seems easier for you, then you are free to choose.

Let me know if you run into any further issues (and leave an email address so that I can respond directly) or just download my VS.NET projects from my homepage.

Title:
Help
Name:
Harmless
Date:
2005-03-08 5:20:33 PM
Comment: Is there a "I code like a human being" example for using this? When I setup datasets, sql connections, and data adapters I dont type all of this:

... I just drop the table I want to work with from my sql server on my design view, configure my data adapter and sql queries, and then I generate my dataset from the data adapter. For setting up the dataset table relations I just double click on my (datasetname).xsd file in solution explorer and drag pkey/fkey relations from/to tables -- I dont type a whole bunch of code for doing this part because its not necessary in visual studio.net. Were your examples written for someone who uses Notepad? I wasnt sure becuase Intialize Component was mentioned and thats part of what would be generated vs.net code when you create a project...

Help -- give me a real example so I can figure out how to use your .dll

thanks for the nice feedback. I am really interested in what features you've added because maybe some of them are general interest.

ThanksDenis

Title:
Great Job
Name:
Richard Turner
Date:
2005-01-07 9:54:35 AM
Comment: I have been using this control for about two months now for one of our web projects and it works great. We have added a few more features but even these have been painless to add. Very well coded. Many thanks. Rich.

Title:
Greate job
Name:
kids_pro
Date:
2004-11-29 9:57:35 PM
Comment: Thank for the article I found it is very useful to my current and future projects. Many thanks

Title:
MASTER-DETAIL-DETAIL RELATIONSHIP
Name:
Brundaban
Date:
2004-11-04 6:32:19 AM
Comment: Nice code it helps me a lot.but i want to display a group of related records against each record of detail in another datagrid i.e parent-child-subchild rows from tables.

it would be a great help to me ,pls send solution

Title:
HierarGrid
Name:
gsims@ldol.state.la.us
Date:
2004-11-02 9:53:16 AM
Comment: The HierarGrid worked wonderfully for me. The only change I need is to show the column heading for the child rows. I've managed to format the child row columns but am unable to get the column headings.

Thanks.

Title:
User Control Events into the Main Application
Name:
Gavin
Date:
2004-10-28 7:51:15 AM
Comment: Excellent, really worked smoothly when I swapped over from a datagrid and added in the relationships.

One thing, I'm a bit stuck on, is trying to get an Event Handle from the User Control into the main page.

I'm trying OnBubbleEvent to do a DataBind on the main DataGrid from the usercontrol ...

on my webUserControl i´ve a single datagrid and a label.it´s show my label but not a datagrid.on datagrid_databind i´ve this code:Dim dgi As DataGridItem = CType(Me.BindingContainer, DataGridItem)If (Not (TypeOf dgi.DataItem Is DataSet)) Then Throw New ArgumentException("Please change the TemplateDataMode attribute to 'Table' in the HierarGrid declaration")End If

I am trying out your control in my project. May I know how can I modify the image source for the plus image? Is there a properties to do so? Currently all my pictures are in Img directory.

In additional, I am trying out using a Datagrid in my Child row, but what are the databinding properties to set for?

If possible, you may contact me at alexccw@singnet.com.sg

Please help. Thanks.

Regards,Alex Chan

Title:
Mr
Name:
Paul Kent
Date:
2004-07-14 6:04:58 AM
Comment: When ive used the Hierargrid, it crashes internet exployer if there is a lot of data in the grid! any idea how to fix this?

Title:
Mr.
Name:
John Gossman
Date:
2004-06-15 3:31:03 PM
Comment: I get the following message when I try to bind to the grid:

Please use the event "TemplateSelection" to specify which template to load for a child table/row Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.WarningException: Please use the event "TemplateSelection" to specify which template to load for a child table/row