Binding DataGrid TemplateColumns to ChildTable of DataSet

Discussion in 'ASP .Net Datagrid Control' started by Axel Reimann, Apr 7, 2004.

  1. Axel Reimann

    Axel Reimann Guest

    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
     
    Axel Reimann, Apr 7, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeremy Chapman

    Creating TemplateColumns for a grid at runtime

    Jeremy Chapman, Jul 25, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    439
    Justin Dutoit
    Jul 26, 2003
  2. =?Utf-8?B?VGltOjouLg==?=

    Problem with datagrid and TemplateColumns

    =?Utf-8?B?VGltOjouLg==?=, Jul 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    327
    Joe Fallon
    Jul 28, 2004
  3. Jim Bancroft
    Replies:
    3
    Views:
    389
  4. jobs
    Replies:
    0
    Views:
    846
  5. SK
    Replies:
    1
    Views:
    225
    Elton Wang
    Feb 15, 2005
Loading...

Share This Page