+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Nesting RadListViews

Nesting RadListViews

7 posts, 0 answered
  1. rubenr
    rubenr avatar
    4 posts
    Registered:
    30 Aug 2011
    30 Aug 2011
    Link to this post
    Hello,

    I have nested 2 radListViews and, when I enter in update mode and I have to access to the nested radListView I get no elements in it:

    "((RadListView)this.lstSkills.EditItems[0].FindControl("lstScoringSkills")).EditItems.Count" returns 0.

    What should I have to get some elements from the radListView called "lstScoringSkills"?

    Thanks in advance
  2. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    01 Sep 2011
    Link to this post
    Hi Rubenr,

    What event are you running your code in, is it possible that you have it to early in the control/pages lifecycle and therefore the child ListView therefore isn't yet in Edit mode.

    Can you post more code perhaps?

    Ta
  3. rubenr
    rubenr avatar
    4 posts
    Registered:
    30 Aug 2011
    01 Sep 2011
    Link to this post

    It is being called from method "BtnAddRangeSkill_Click" specified here:

    <asp:LinkButton

    ID="btnShowRangeSkillInsert"

    runat="server"

    Text="Add another range"

    CssClass="addRowButton"

    OnClick="BtnAddRangeSkill_Click" />

     



  4. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    01 Sep 2011
    Link to this post
    Thanks and where are you setting the RadListViews into edit mode?
  5. rubenr
    rubenr avatar
    4 posts
    Registered:
    30 Aug 2011
    01 Sep 2011
    Link to this post
    Here, in the ItemTemplate of the first RadListView:

     

     

    <asp:LinkButton

     

     

     

    ID="btnEdit"

     

     

     

    runat="server"

     

     

     

    Text="Edit"

     

     

     

    OnClick="OdsSkills_ItemEditing"

     

     

     

    CommandArgument='<%# Eval("Id") %>'

     

     

     

    CommandName="Edit"

     

     

     

    CausesValidation="false" />

     

  6. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    01 Sep 2011
    Link to this post
    Hi,

    Sorry but you really aren't giving me a full picture here, could you perhaps post larger chunks of code perhaps the full listing of both HTML and codebehind?  Otherwise it could be any one of a hundreds things as I really don't know how you would have set it up?

    Also if you use the Format Code block option when adding a post that will help keep it neater for everyone to read?

    Thanks
  7. rubenr
    rubenr avatar
    4 posts
    Registered:
    30 Aug 2011
    01 Sep 2011
    Link to this post
    Hi!

    I solved it using:

    ((

     

    RadListView)this.lstSkills.InsertItem.FindControl("lstScoringSkills")).ShowInsertItem();

     


    Thanks!
7 posts, 0 answered