We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

URL ADAPTOR y VIRTUALSCROLLING EN TREEGRID

Thread ID:

Created:

Updated:

Platform:

Replies:

127752 Dec 6,2016 06:10 PM Dec 9,2016 07:49 AM ASP.NET MVC 3
loading
Tags: TreeGrid
César Ventura
Asked On December 6, 2016 06:10 PM

Que tal, quiero saber si es posible utilizar URL adaptor para mostrar los datos en un treegrid,
y utilizar virtualscrolling al igual que un grid normal, ya que quiero cargar miles de datos, y cargar todos a la vez es muy tardado.

es posible?, ya que he intentado y no me funciona.

de antemano muchas gracias.

Jonesherine Stephen [Syncfusion]
Replied On December 8, 2016 12:26 PM

Hi Cesar, 
Thanks for contacting Syncfusion support 
In TreeGrid we can load large number of data by using “enableVirtualization” property. We have prepared the sample and populated 1000 records by using URL adaptor in virtualization mode.  
Please find the code example below 
[view] 
@(Html.EJ().TreeGrid("TreeGridContainer") 
       .EnableVirtualization(true)      
       .Datasource(ds => ds.URL("/TreeGrid/GetTreeGridData").Adaptor(AdaptorType.UrlAdaptor)) 
    ) @(Html.EJ().ScriptManager()) 
 
 
[controller] 
public JsonResult GetTreeGridData() 
        { 
            var Data = db.TreeGridDatas.ToList();            
            return Json(Data, JsonRequestBehavior.AllowGet); 
        } 
We have also prepared the sample based on this, please find the sample from below location 
 
Disclaimer: We have removed bin and obj folder in the given sample for some security reasons, we must include Syncfusion.EJ, Syncfusion.EJ.MVC, dlls to render the TreeGrid control which is available in Essential Studio installed location.   
Please let us know if you require further assistance on this.
Regards, 
Jone sherine P S
  


César Ventura
Replied On December 8, 2016 01:42 PM

Hola Jonesherine Stephen!
Gracias por tu pronta respuesta,
ya lo implemente de la manera que me indican, pero al ejecutar me aparece el error:

executeQuery() : A query is required to execute
Error: DataManager - executeQuery() : A query is required to execute

y no me muestra información, ni tampoco el treegrid, que puedo hacer para solucionarlo?

Jonesherine Stephen [Syncfusion]
Replied On December 9, 2016 07:49 AM

Hi Cesar, 
Sorry for the inconvenience caused. 
We have analysed the reported issue with our sample. To render the TreeGrid with ejDataManager the query should be a valid one. It won’t be an empty string. Can you please ensure whether the valid query is provided in a “query” property in your sample?  
We have also prepared the sample with “query” and fetched 10 records by using “take” property.  
Please find the code example below: 
[view] 
 
@(Html.EJ().TreeGrid("TreeGridContainer")        
       .Query("new ej.Query().take(10)")        
       .Datasource(ds => ds.URL("/TreeGrid/GetTreeGridData").Adaptor(AdaptorType.UrlAdaptor)) 
    ) 
    @(Html.EJ().ScriptManager()) 
 
[controller] 
  public JsonResult GetTreeGridData(Syncfusion.JavaScript.DataManager dm) 
        { 
            var Data = db.TreeGridDatas.ToList(); 
            var result = Data.Take(dm.Take); 
            return Json(result, JsonRequestBehavior.AllowGet); 
        } 
We have prepared the sample in version 14.4.0.15 for your reference.  
Please find the sample from below location 
If still the problem exists at your end, please revert us by modifying the sample based on your application along with the replication procedure. This would be helpful for us to serve you. 
Please let us know if you need further assistance on this, 
Regards, 
Jone sherine P S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;