- Home
- Forum
- LightSwitch HTML
- Virtual Scroll mode and server side paging
Virtual Scroll mode and server side paging
Hi Xander,
Thanks for using Syncfusion Products.
We have anylyzed your code snippets and found that you have used local data for Grid datasource which loads all data to Grid at intial time. So we suggest you to use DataManager to bind remote data to Grid which loads only required data(based on current page) to grid. Please refer the following code snippets.
|
itemTemplate.ejGrid( { dataSource: ej.DataManager({ url: "http://mvc.syncfusion.com/Services/Northwnd.svc/Orders/" }), ... }); |
For your convenience we have created a sample and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/131811/LightSwitchEJVirtual_(2)1236052780.zip
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Xander,
Query 1: “virtual scrolling on a LightSwitch visual collection is not possible?”
We are analyzing the issue “visual collection does not work” with high priority and we will update you further details on November 13, 2014.
Query 2: “Virtual scrolling with on-demand paging”
For now we have created Odata service in LightSwitch DataSource and given odata service link to DataManager which processes on-demang paging. Using DataManager we can bind data from services to Grid by giving the service link in “url” property of DataManager. Please refer the following code snippets.
|
itemTemplate.ejGrid( dataSource: ej.DataManager({
url: "/NORTHWNDEntitiesData.svc/Orders"
}), ... } |
For your convenience we have modified the sample and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/130962/LightSwitchEJVirtual699278601.zip
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Hi Xander,
Query: “virtual scrolling on a LightSwitch visual collection is not possible?”
In the DataManager “url” property, we can give the visual collection service link to load grid using visual collection data. Please refer the following code snippets.
|
var database = contentItem.valueModel.source.target.source.member.id.split("/")[0] var table = contentItem.valueModel.name var vCollection = myapp.rootUri +"/" +database + ".svc/" + contentItem.valueModel.name ;
itemTemplate.ejGrid( {
dataSource: ej.DataManager({ url: vCollection }), ... })
|
For your convenience we have created a sample and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/130064/LightSwitchEJVirtual-628984651.zip
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Hi Xander,
Thanks for the update.
We have created a new incident (132378) on behalf of you related to the query “server side paging working with visual collection” in this forum. We suggest you to follow up the incident for further reference using your direct trac account.
Please let us know if you have any concerns.
Regards,
Alan Sangeeth S
Hi Xander,
We are sorry to let you know that “Server-side paging with visual collection” is not currently supported and we had logged this requirement as a feature request in our database. So for your better follow-up with this feature requirement we have created the incident (#132378) by which you can track the feature status.
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Thanks for using Syncfusion products.
For your information, currently we have not planned for the feature “Server-side paging with visual collection”.
A support incident has been created under your account to track the status of this requirement “Server-side paging with visual collection”. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
But we suggest you to use the workaround using DataManager for which we have provided solution in this same forum on November 14, 2014.
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Thanks for using Syncfusion Products.
We suggest you to use “UrlAdaptor” of DataManager to process server-side queries. We can also send additional Parameters to server-side using “query” Grid Property. Please refer the following code snippets.
|
itemTemplate.ejGrid( { dataSource: ej.DataManager({url: "/Grid/DataSource", adaptor:"UrlAdaptor"}), query:ej.Query().addParams("customer","THOMSP"), });
public ActionResult DataSource(DataManager dm, string customer) {
IEnumerable DataSource = OrderRepository.GetAllRecords().Where(ds=> ds.CustomerID == customer); … DataSource = opt.PerformTake(DataSource, dm.Take); return Json(new { result = DataSource, count = count}, JsonRequestBehavior.AllowGet); } |
For your convenience we have created a sample and the same can be downloaded from below location.
Sample: http://www.syncfusion.com/downloads/support/forum/117561/ze/LightSwitchEJVirtual699278601-2046726456
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
- 12 Replies
- 3 Participants
-
XV Xander van der Merwe
- Nov 7, 2014 10:51 PM UTC
- Jul 10, 2015 12:38 PM UTC