Nested Datagrid

E

Ed

Hi,

I am trying to nest multiple datagrids within each other.
for example Customer -> Orders -> Order Lines.

I have filled a dataset, created the relationships, and
this all works fine, when I iterate through the dataset
datarow by datarow and get the child rows this works fine.

The problem I am having is that when binding the nested
datagrid to the child rows of the parent datagrid I am
getting the following displayed in the nested datagrid:
RowError HasErrors
False
False

The strange thing about this is that the number of errors
displayed matches the number of child rows for that
parentID.

I tried many ways to bind the data, currently I am using
the following in the DataGrid1.ItemDataBound routine:

tst = dsLong.Tables(0).Rows
(e.Item.DataSetIndex).GetChildRows("2Way2KWLinks")
dg.datasource = tst
dg.databind

Any help would be much appreciated

tia
 
K

Ken Cox [Microsoft MVP]

Hi Ed,

Make sure you check out Dino Esposito's article/code on nested grids:

http://msdn.microsoft.com/msdnmag/issues/03/10/CuttingEdge/default.aspx

--

Important: Patch Windows *beyond* Blaster.
http://www.microsoft.com/technet/security/bulletin/MS03-039.asp


Hi,

I am trying to nest multiple datagrids within each other.
for example Customer -> Orders -> Order Lines.

I have filled a dataset, created the relationships, and
this all works fine, when I iterate through the dataset
datarow by datarow and get the child rows this works fine.

The problem I am having is that when binding the nested
datagrid to the child rows of the parent datagrid I am
getting the following displayed in the nested datagrid:
RowError HasErrors
False
False

The strange thing about this is that the number of errors
displayed matches the number of child rows for that
parentID.

I tried many ways to bind the data, currently I am using
the following in the DataGrid1.ItemDataBound routine:

tst = dsLong.Tables(0).Rows
(e.Item.DataSetIndex).GetChildRows("2Way2KWLinks")
dg.datasource = tst
dg.databind

Any help would be much appreciated

tia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top