Repeater inside GridTemplateColumn

4 posts, 0 answers
  1. Erik
    Erik avatar
    22 posts
    Member since:
    Apr 2009

    Posted 18 Feb 2010 Link to this post

    Repeater InterestsRepeater = e.Item.FindControl("rptInterests"as Repeater; 
    if (InterestsRepeater != null
        InterestsRepeater.DataSource = Bazaar.Web.Model.Business.Interest.GetByMemberId(Convert.ToInt32(RadGridMembers.Columns.FindByUniqueName("Id"))); 
        InterestsRepeater.DataBind(); 

    <telerik:GridTemplateColumn DataField="interests" UniqueName="interests" HeaderText="Intressen"
       <ItemTemplate> 
          <%#DataBinder.Eval(Container.DataItem, "interests")%> 
          <asp:Repeater ID="rptInterests" runat="server"
                <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "Name")%></ItemTemplate
          </asp:Repeater> 
       </ItemTemplate> 
    </telerik:GridTemplateColumn> 

    The InterestsRepeater is allways null in the method ItemDataBound, I've tried to find de repeater with a Recursive method but with no luck, Is there somehing I've missed! I've tried to solve this for quite a time now so im out of ideas is there someone that can't see what im doing wrong or what Im missing to do?

    Tanks for all replies!


    <telerik:GridTemplateColumn DataField="interests" UniqueName="interests" HeaderText="Intressen"
       <ItemTemplate> 
          <%#DataBinder.Eval(Container.DataItem, "interests")%> 
          <asp:Repeater ID="rptInterests" runat="server"
                <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "Name")%></ItemTemplate
          </asp:Repeater> 
       </ItemTemplate> 
    </telerik:GridTemplateColumn> 

  2. Erik
    Erik avatar
    22 posts
    Member since:
    Apr 2009

    Posted 18 Feb 2010 Link to this post

    Solved!

    if (e.Item is GridDataItem) 
                { 
                    Bazaar.Web.Model.Data.Entities.Member tmpItem = (Bazaar.Web.Model.Data.Entities.Member)e.Item.DataItem; 
                    Repeater InterestsRepeater = e.Item.FindControl("rptInterests"as Repeater; 
                    if (InterestsRepeater != null
                    { 
                        InterestsRepeater.DataSource = Bazaar.Web.Model.Business.Interest.GetByMemberId(Convert.ToInt32(tmpItem.Id)); 
                        InterestsRepeater.DataBind(); 
                    } 
                } 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hanaa
    Hanaa avatar
    4 posts
    Member since:
    Jan 2014

    Posted 27 Jan 2014 in reply to Erik Link to this post

    hi ,
    i wanna do paging in repeater
    i give repeater datasource in radgrid but it show many items and don't apply paging , 
    plz help  
  5. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 30 Jan 2014 Link to this post

    Hello Hanaa,

    Can you please verify that the Repeater works as expecting outside the grid?

    Looking forward to your reply.

    In addition, you can check RadListView control:
    http://demos.telerik.com/aspnet-ajax/listview/examples/overview/defaultcs.aspx

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top