Why is my Listview not populated

2 posts, 0 answers
  1. Tonyz289
    Tonyz289  avatar
    50 posts
    Member since:
    Jun 2011

    Posted 14 Mar 2012 Link to this post

    I have two Listview's. They are populated the same was. One does not give any evidence of getting any data. HELP!

    Here is the definition of the one that has no data:
    <telerik:RadListView ID="RadListView2" runat="server" AllowPaging="True" ItemPlaceholderID="ListPlaceHolder"
        Skin="listview_2" EnableEmbeddedSkins="false" DataKeyNames="id,filenameextension,typeAbbr,title"
        OnNeedDataSource="RadListView2_NeedDataSource">
        <LayoutTemplate>
            <table id="products" class="products">
                <thead>
                    <tr>
                        <th>
                            Prev
                        </th>
                        <th class="expand">
                        </th>
                        <th>
                            File Name
                        </th>
                        <th>
                            Asset Type
                        </th>
                        <th>
                            Document Type
                        </th>
                        <th>
                            Advertiser Name
                        </th>
                        <th>
                            Advertiser Category
                        </th>
                        <th>
                            Details
                        </th>
                        <th>
                            Market
                        </th>
                        <th>
                            Product Category
                        </th>
                        <th>
                            Keywords
                        </th>
                        <th>
                            Approved
                        </th>
                        <th>
                            Date
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr id="ListPlaceHolder" runat="server">
                    </tr>
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%# String.Format("javascript:Popup_Window('asset_preview', '{0}');", Eval("id").ToString())%>
                </td>
                <td>
                    <asp:CheckBox ID="ChkImage2" runat="server" Style="float: left; padding-top: 5px" />
                </td>
                <td>
                    <%# String.Format("javascript:Popup_Window('asset_detail', '{0}');", Eval("id").ToString())%>
                </td>
                <td>
                    <%# Eval("typeAbbr")%>
                </td>
                <td>
                    <%# Eval("documentTypeText")%>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
            No Assets Found 2
        </EmptyDataTemplate>
    </telerik:RadListView>
  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 19 Mar 2012 Link to this post

    Hello,

    I think that the problem is in the databinding you are using. Could you share your RadListView_NeedDataSource event?

    Additionally, I am attaching the project I used to test your case. Give the project a try and check whether there are differences with your project.

    Regards,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top