Binding DataGrid TemplateColumns to ChildTable of DataSet

A

Axel Reimann

Hi!

I'm quite frustrated because i'm stuck in a problem i couldn't solve
so far: i have a dataset, containing 9 Tables (1 master-table, 8
child-tables, with master-child-relations set). in the .aspx-page, i
have a DataGridControl, bound to the master-table of the dataset. As
long as i user bound columns in the datagrid, it's no problem to bind
them to the corresponding fields of the master-table by
"DataField=<FIELD_NAME>".
My problem is to use TemplateColumns in the DataGrid, that are bound
to corresponding fields of a child-table.
This was a (unsucsessful) try:
<ItemTemplate>
<%# DataBinder.Eval(((DataRowView)Container.DataItem).Row.GetChildRows(<NAME_OF_RELATION>),
"[<NAME_OF_FIELD_IN_CHILD_TABLE>]") %>
</ItemTemplate>

I tried several combinations :) but nothing worked!

Can anyone HELP ME ???

Thanks in advance,

Axel
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top