Nesting RadListViews

Posted by Community Admin on 05-Aug-2018 16:28

Nesting RadListViews

All Replies

Posted by Community Admin on 30-Aug-2011 00:00

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

Posted by Community Admin on 01-Sep-2011 00:00

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

Posted by Community Admin on 01-Sep-2011 00:00

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" />

 



Posted by Community Admin on 01-Sep-2011 00:00

Thanks and where are you setting the RadListViews into edit mode?

Posted by Community Admin on 01-Sep-2011 00:00

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" />

 

Posted by Community Admin on 01-Sep-2011 00:00

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

Posted by Community Admin on 01-Sep-2011 00:00

Hi!

I solved it using:

((

 

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

 


Thanks!

This thread is closed