Hi Sagi,
We considered this “Endless scrolling for Mobile ListView” as a feature request and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Dhinesh Ravi
We have already locked a feature report for “Endless Scrolling in Mobile ListView” and a support incident has been created under your account to track the status of the requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
But, we can achieve the endless scrolling for ListView in sample level. Refer to the following steps to achieve the required scenario.
We need to create a div elements for ListView and ScrollPanel control. So that ListView will be rendered within ScrollPanel, and on ScrollEnd event, we can update the dataSource for ListView. Refer to the following code example.
[Html] <!--ScrollPanel target --> <div id="target"> <!--ScrollPanel renders within the div element of the target--> <div>
<!--ListView div element--> <div id="remotelistbox"> </div> </div> </div>
<!--ScrollPanel control--> |
[Html] <script type="text/javascript"> // Initialize the dataManager for the remote datasource window.datasource = ej.DataManager({ url: "http://mvc.syncfusion.com/Services/Northwnd.svc/" }); //To Map the text values from the datasource window.dbitem = { "text": "ShipCity" };
//Fetch 17 items from the remote datasource var query = ej.Query().from('Orders').select('ShipCity').take(17); $(function () { // Execute the query to retrieve the datas from datasource window.datasource.executeQuery(eval(query)).done(function (e) { //DB for ListView control window.db = e.result; $("#remotelistbox").ejmListView({ dataBinding: true, fieldSettings: window.dbitem, dataSource: window.db, allowScrolling: false }); }); |
[Html] <div id="scroller" data-role="ejmscrollpanel" data-ej-target="target" data-ej-scrollend="scrollend"></div> <script type="text/javascript"> //Executes once the scrollpanel scrolling stopped function scrollend(args) {
// To get the number of li elements in the listview var index = $("#remotelistbox li").length;
// Checks whether the maximum scrollPosition and scrollend position are equal if (args.object._maxScrollY == args.y) { var getRange = index + 10;
//fetches the datas within the specified range window.datasource.executeQuery(eval(ej.Query().from('Orders').select('ShipCity'). range(index, getRange))).done(function (e) { //Merges the existing datasource with the new datas window.db = window.db.concat(e.result); $("#remotelistbox").ejmListView({ dataSource: window.db }); $("#scroller").ejmScrollPanel('refresh') }) } |