FormView/Repeater/ Eval(FormView data)

Discussion in 'ASP .Net Web Controls' started by David Thielen, Jun 16, 2006.

  1. Hi;

    I have (lots of tags not shown):
    <asp:FormView ID="EditUser" runat="server" DataSourceID="UserData"
    DataKeyNames="username">
    works: <%# Eval("UserName") %>
    <asp:Repeater ID="mapRows" runat="server" DataSourceID="RoleData">
    fails: <%# Eval("UserName") %>
    </asp:Repeater>
    </asp:FormView>

    How do I get at data bound to the outer FormView inside the Repeater?

    --
    thanks - dave
    david_at_windward_dot_net
    http://www.windwardreports.com
     
    David Thielen, Jun 16, 2006
    #1
    1. Advertising

  2. Hello Dave,

    Thanks for your posting.

    From your description, you'd like to access the parent container's
    databinding context(DataItem) in the nested databound control's databinding
    code, correct?

    Based on my understanding, it is not quite easy to do so since the
    ItemDatabound of template databound control only contains the current
    databinding context's info. What's the detailed scenario of your
    databinding page, are you dealing with some master/detail or parent/child
    table data? I think we may look for some other approach to workaround it?

    Please feel free to post here.

    Regards,

    Steven Cheng
    Microsoft MSDN Online Support Lead


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Jun 16, 2006
    #2
    1. Advertising

  3. Hi;

    Yes, that is exactly what I want. If it can't be done in the aspx I can
    easily do it in the code behind.

    --
    thanks - dave
    david_at_windward_dot_net
    http://www.windwardreports.com



    "Steven Cheng[MSFT]" wrote:

    > Hello Dave,
    >
    > Thanks for your posting.
    >
    > From your description, you'd like to access the parent container's
    > databinding context(DataItem) in the nested databound control's databinding
    > code, correct?
    >
    > Based on my understanding, it is not quite easy to do so since the
    > ItemDatabound of template databound control only contains the current
    > databinding context's info. What's the detailed scenario of your
    > databinding page, are you dealing with some master/detail or parent/child
    > table data? I think we may look for some other approach to workaround it?
    >
    > Please feel free to post here.
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft MSDN Online Support Lead
    >
    >
    > ==================================================
    >
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    >
    > ==================================================
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
     
    David Thielen, Jun 16, 2006
    #3
    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. Eric Newton
    Replies:
    3
    Views:
    9,557
    Brock Allen
    Apr 4, 2005
  2. DataBinder.Eval and Eval.

    , Jun 16, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    573
    Karl Seguin [MVP]
    Jun 16, 2006
  3. Alex van der Spek

    eval('07') works, eval('08') fails, why?

    Alex van der Spek, Jan 8, 2009, in forum: Python
    Replies:
    6
    Views:
    1,529
    Bruno Desthuilliers
    Jan 8, 2009
  4. Liang Wang
    Replies:
    8
    Views:
    147
    Ben Morrow
    Feb 2, 2008
  5. Marc Girod

    to eval or not to eval?

    Marc Girod, Apr 19, 2011, in forum: Perl Misc
    Replies:
    2
    Views:
    172
    Marc Girod
    Apr 19, 2011
Loading...

Share This Page