Nesting RadListViews
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
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
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" />
Thanks and where are you setting the RadListViews into edit mode?
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" />
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
Hi!
I solved it using:
((
RadListView)this.lstSkills.InsertItem.FindControl("lstScoringSkills")).ShowInsertItem();