tags:

views:

19

answers:

1

Hi,

I have implemented a reorderList in c#.net and everything works fine The only problem is that i am not able to retrieve the list data source. For this reason i tried to Find the controls for each item in the list without any success.

this is my reorderlist

<ajaxToolkit:ReorderList ID="rlVerticalMenu" runat="server" DragHandleAlignment="Left"
          ItemInsertLocation="Beginning" DataKeyField="Id" SortOrderField="Priority"
          EnableViewState="true" OnItemReorder="rlWorkItems_ItemReorder" 
          CallbackCssStyle="ClsCallBackStyle" CssClass="ClsReorderListContainer">          
        <ItemTemplate>                
            <div class="ClsItemArea">
               <div>                    
                    <asp:Label ID="LblId" runat="server" Visible="false" CssClass="editable_textarea"><%# Eval("Id") %></asp:Label>                        
                    <div class="verticalMenuItem">
                        <asp:Label ID="LblDisplayName" runat="server" CssClass="editable_textarea"><%# Eval("DisplayName") %></asp:Label>                        
                    </div>
                    <div class="verticalMenuItem">                        
                        <asp:Label ID="LblHref" runat="server" CssClass="editable_textarea"><%# Eval("Href")%></asp:Label>
                    </div>
               </div>                                               
            </div>
        </ItemTemplate>
        <ReorderTemplate>
            <asp:Panel ID="Panel2" runat="server" CssClass="ClsReorderCue">
            </asp:Panel>
        </ReorderTemplate>
        <DragHandleTemplate>
            <div class="ClsDragHandle">
            </div>
        </DragHandleTemplate>
    </ajaxToolkit:ReorderList>                       
   <button id="BtnGenerateMenu" onclick="GenerateMenu();">Generate Menu</button>

when clicking BtnGenerateMenu i do an ajax call and on the code behind i am trying to retrieve the value of the labels inside each item

could you help me please?

This is what i tried but doesnt work

((System.Web.UI.WebControls.Label)rlVerticalMenu.Items[i].FindControl("LblDisplayName"))

Any suggestion?

Thanks

A: 

I found the solution

the label should be

' />

GigaPr

related questions