This is a migrated thread and some comments may be shown as answers.

Problem with embedded RadListView

1 Answer 69 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 01 Jul 2011, 02:26 PM
We have the following code. At first we attempted to use a RadDataPager for the paging but the paging wasnt working. So i added asp buttons to see what is occuring the following error is returned:

Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element

I think the problem is that this RadListView is embedded within another RadListView (and some other server controls) further up the page. How can we get an embedded RadListView like this to page correctly?

Code is below.

Thanks
<asp:Panel ID="pnlMultiImagePreview" runat="server" Visible="false">
                        <asp:UpdatePanel ID="upMultiImagePreview" runat="server">
                            <ContentTemplate>                    
                                <telerik:RadListView ID="rlvMultiImagePreview" runat="server" DataKeyNames="PreviewImage" AllowPaging="true" ItemPlaceholderID="ImagesContainer" PageSize="1" >
                                    <ItemTemplate>
                                        <asp:Panel ID="pnlMultiImagePage" runat="server">
                                            <asp:Image ID="imgMultiThumb" runat="server" ImageUrl='<%#Eval("PreviewImage")%>' CssClass="previewImage" />
                                        </asp:Panel>                    
                                    </ItemTemplate>
                                    <LayoutTemplate>
                                   <!-- Set the id of the wrapping container to match the CLIENT ID of the RadListView control to display the ajax loading panel           In case the listview is embedded in another server control, you will need to append the id of that server control -->
                                    <fieldset id="rlvMultiImagePreview">
                                    <legend>Images</legend>
                                    <asp:PlaceHolder ID="ImagesContainer" runat="server" />
  
                                        <div style="padding-left: 20%;">
                                          
                                         <asp:Button runat="server" ID="btnFirst" CommandName="Page" CommandArgument="First"
                        Text="First" Enabled="<%#Container.CurrentPageIndex > 0 %>" />
                          
                    <asp:Button runat="server" ID="btnPrev" CommandName="Page" CommandArgument="Prev"
                        Text="Prev" Enabled="<%#Container.CurrentPageIndex > 0 %>" />
                          
    <span style="vertical-align: top; position: relative; top: 4px">Page <%#Container.CurrentPageIndex + 1 %> of <%#Container.PageCount%> </span>
  
      
                    <asp:Button runat="server" ID="btnNext" CommandName="Page" CommandArgument="Next"
                        Text="Next" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" />
                    <asp:Button runat="server" ID="btnLast" CommandName="Page" CommandArgument="Last"
                        Text="Last" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" />
  
                                      
                                            <br />
                                        </div>
                                        <div id="itemPlaceHolder" runat="server">
                                        </div>
                                         </fieldset>
                                    </LayoutTemplate>
                                </telerik:RadListView>
                            </ContentTemplate>
                        </asp:UpdatePanel>                        
                    </asp:Panel>

 

1 Answer, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 06 Jul 2011, 11:59 PM
Hi Lee,

I suspect the issue that you are having is not coming because of multiple nested list views.
I see that you have an update panel that wraps the RadListView. Do you have any other panels in the page or in the page that has the current control? If so try removing them and check whether the issue persists.

I am also attaching a simple project that illustrates nesting ListViews.

Hope this helps.

Regards,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ListView
Asked by
Lee
Top achievements
Rank 1
Answers by
Genti
Telerik team
Share this question
or