DataList control in DataListItem

Discussion in 'ASP .Net' started by Mirek Endys, Nov 21, 2005.

  1. Mirek Endys

    Mirek Endys Guest

    I need to know, how to bind data into DataList, that is placed in another
    DataList in SelectedItemTemplate.
    I tried to FindControl on ItemCreated event, on PageLoad event, but I cannot
    get this control???

    How to do this???

    Thanks

    Mirek
     
    Mirek Endys, Nov 21, 2005
    #1
    1. Advertisements

  2. Mirek Endys

    Mirek Endys Guest

    I have found that.
    I have Bound parent dataList in code by:

    dlDTDefinitions.DataSource = transfers;
    dlDTDefinitions.DataBind();

    transfers is a List<iDB2SQLTransferItem> and the item (iDB2SQLTransferItem)
    contain DataMappings that is List<DataMappingItem>.

    in aspx i have to bind DataSource of the child DataList:

    <asp:DataList ID="dlDataMapping" runat="server" DataSource='<%#
    DataBinder.Eval(Container.DataItem, "DataMappings") %>'>

    Thats all
     
    Mirek Endys, Nov 21, 2005
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.