Virtual Scrolling using ObjectDataSource

2 posts, 0 answers
  1. Digifox
    Digifox avatar
    3 posts
    Member since:
    Apr 2007

    Posted 31 May 2014 Link to this post

    Is it possible to get Virtual Scrolling going using ObjectDataSource? I haven't been able to find any good examples except for those on the demo-site (http://demos.telerik.com/aspnet-ajax/dropdownlist/examples/functionality/virtualscrolling/defaultcs.aspx). Unfortunately, the DropDownList doesn't seem to provide the ObjectDataSource with values for "StartIndex" and "ItemsCount" as per the WebService-datasource example.

    Below is a simple example, describing the desired scenario. The Facade is in place and works well with other types of solutions, e.g. paging a Grid using an ObjectDataSource.


    <asp:ObjectDataSource ID="ODSNotifications" runat="server"
            TypeName="NotificationsFacade"
            SelectMethod="Get"
            OnSelecting="ODSNotifications_Selecting"
            EnablePaging="true"
            SelectCountMethod="GetCount"       
            StartRowIndexParameterName="StartIndex"
            MaximumRowsParameterName="ItemsCount">
            <SelectParameters>
                <asp:Parameter Name="userId" Type="Int32" />
                <asp:Parameter Name="fromDate" Type="DateTime" />
            </SelectParameters>
        </asp:ObjectDataSource>
     
        <telerik:RadDropDownList ID="RDDLNotifications" runat="server"
            DataSourceID="ODSNotifications"
            CssClass="RDDLNotifications"
            DataValueField="Title"
            DataTextField="Id"
            OnItemDataBound="RDDLNotifications_ItemDataBound"
            DropDownWidth="200px"
            DropDownHeight="100px"
            EnableVirtualScrolling="true">
            <ItemTemplate>
                <asp:Panel ID="PNotification" runat="server" CssClass="w_n_outer" onclick="StopPropagation(event);">
                    <div class="w_n_inner">
                        <asp:Label ID="LType" runat="server" Font-Size="0.8em" />
                        <br />
                        <asp:Label ID="LTitle" runat="server" Font-Bold="true" />
                        <br />
                        <asp:Label ID="LBody" runat="server" />
                    </div>
                </asp:Panel>           
            </ItemTemplate>
        </telerik:RadDropDownList>

    Any help would be greatly appreciated!


  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 04 Jun 2014 Link to this post

    Hello Andreas,

    I am afraid that currently such implementation is not possible, since as you had well observe the ItemsCount and StartIndex are the needed parameters, for the implementation of the asynchronous loading of the Items (when the Virtual Scrolling is enabled. )

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top