Can anyone write me a code where I can create a hierarchical grid programmatically by adding each row separately? I know data binding is a nice cute feature but our software design doesn't permit us using the binding directly. So I need to add data one by one in the grid, that too in hierarchical fashion.
The concept of bands is kinda confusing.
Can anyone please just write a small like of code where I create a grid, add couple of columns and a couple of rows to it. And for each row I need to two columns and 1 row each.
Thanks. I just need an idea of the thing.
anup84,
I don't myself know of a certain way to accomplish this result using our ASP.NET controls.
As a thought, you might be able to handle this using our new WebDataTree control, using a table row in the template of each node. Doing so is beyond my own personal knowledge; if you want to investigate this and find you need assistance, I suggest you post in the WebDataTree forum.
Hi MacDonald
Thank you for ur support....can we have any other control thru wich i achive this functionality.
If I'm correctly reading the code where you're creating your DataRelation objects, you have three tables: Table, Table1, and Table2. The relations you're creating mean that Table1 is a child of Table, and Table2 is also a child of Table.
WebGrid isn't capable of showing multiple sets of child tables in this fashion. You can only have one child band (roughly analagous to a single DataTable) for any one parent band.
Hi ,
I m also suffering from same problem ....can you help me. I have code snippest which is bind DataSet .
DataSet dsSearch = new DataSet();
{
new DataColumn[ { dsSearch.Tables["Table1"].Columns[0], dsSearch.Tables["Table1"].Columns[2] }, false);
new DataColumn[ { dsSearch.Tables["Table2"].Columns[7] }, false);
}
this.UG1.DataSource = dsSearch;
Problem is ....It is not display third level data. Its only display 2 level data.
I want to display
1.Comapnay
2.Contact Name 3.Matter Name
2.Contact Name
3.Matter Name
Is it possible with Hierarchical grid.
nguyentt said:I added a few more lines just to help someone new like I am.
Way to go, friend!