REPOST - Parent List Data Item!

Discussion in 'ASP .Net' started by Adam Knight, Nov 21, 2005.

  1. Adam Knight

    Adam Knight Guest

    Hi all,

    I am really trying to find a solution to this problem.

    I have a pair of nested data lists.

    I want to retrieve a current value out of the parent lists DataItem object
    (?.?.Container.DataItem) , inside a template within the child list.
    This happens while the page is databinding, obviously using
    Container.DataItem for all other page values.

    Can anyone help me with this?

    No item is being selected in the parent list, so the selected index won't
    achieve what i am after.

    Cheers,
    Adam
     
    Adam Knight, Nov 21, 2005
    #1
    1. Advertising

  2. Adam Knight

    Adam Knight Guest

    Hi all,

    This is one solution i have come up with..

    It appears a little clumsy to me though???

    <%#
    CType(Container.Parent.Parent.Parent.Parent,DataListItem).DataItem("standard_id")
    %>
    If retrieves the CURRENT list item of the parent list..and accesses the
    DataItem Object.

    Cheers,
    Adam

    "Adam Knight" <> wrote in message
    news:...
    > Hi all,
    >
    > I am really trying to find a solution to this problem.
    >
    > I have a pair of nested data lists.
    >
    > I want to retrieve a current value out of the parent lists DataItem object
    > (?.?.Container.DataItem) , inside a template within the child list.
    > This happens while the page is databinding, obviously using
    > Container.DataItem for all other page values.
    >
    > Can anyone help me with this?
    >
    > No item is being selected in the parent list, so the selected index won't
    > achieve what i am after.
    >
    > Cheers,
    > Adam
    >
     
    Adam Knight, Nov 21, 2005
    #2
    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. D. Shane Fowlkes
    Replies:
    0
    Views:
    1,021
    D. Shane Fowlkes
    May 13, 2004
  2. Shahid Saleem
    Replies:
    1
    Views:
    744
    =?Utf-8?B?RWx0b24gVw==?=
    Aug 26, 2005
  3. Skowronek
    Replies:
    4
    Views:
    4,539
    ProgTalk
    Dec 4, 2007
  4. QUASAR
    Replies:
    6
    Views:
    431
    QUASAR
    Jan 17, 2004
  5. Karen Grube
    Replies:
    5
    Views:
    532
    Michael Baltic
    Jul 14, 2005
Loading...

Share This Page