Suppose in a dataset, I have 3 tables, all has identical structure (column name and types), but different values. Lets call them A,B,C. Columnnames are (DepartmentID, DepartmentName, Parent):
These 3 table will create 3 bands, right? This is Table A:
This is table B: (child1)
This is table C: (Child2)
Relations are created based on parent's "DepertmentId" column and Child's "Parent" column for both cases. But when I've set the datasource for ultragrid, (this.uxStatisticWebGrid.DatasetAsDataSource=.....) only 2 bands are shown. Parent band and the band that is available in the first relation (table A with table B). If I remove the first relation, only then the 2nd relation is shown (table A with table C). Why dont 2 relation with (Table A) are shown in grid at the same time? Plz help on this.
Thanks again, Mr. Mcdonald. But isnt there any other way around to solve this?
There are a couple of alternative approaches one can take.
One option is to show multiple WebGrid controls. One control contains the "root" data, and causes a postback (possibly made into an AJAX callback by a WARP or UpdatePanel) when its active row changes. The other two grids display the "child" data in each table, appropriate to the currently-active row in the "root" grid.
Another option may be to use the grid's Row Edit Template to display child data. As above, use one grid that contains the "root" data. The other two grids are placed in the row edit template. Details on this approach are provided in the following article from our online Knowledge Base:HOWTO: Placing Another WebGrid inside Row Edit Template
There may be other options as well. At current, all of these approaches will require showing your child data in different controls than the WebGrid instance containing your "root" data.