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
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); } |