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. Image for the cookie policy date

"FilterType.excel" DON'T WORKING WITH URL ADAPTOR



Hola!,
He trata de implementar el filtro "FilterType.excel" para filtrar todos los datos que tengo almacenados en la base de datos,
estoy implementando un URL ADAPTOR ya que cargo miles de registros, 
al querer utilizar el filtro, este no funciona ya que no filtra ningún dato, como puedo hacer funcionar ese filtro? 
mi código es el siguiente:

VIEW:

 @(Html.EJ().Grid<BID_MEDIA>("FlatGrid")
            .Datasource(ds => ds.URL("/Media/DataSource").Adaptor(AdaptorType.UrlAdaptor))
            .ScrollSettings(scroll => { scroll.Height(height).Width("auto").FrozenRows(0).AllowVirtualScrolling(true).VirtualScrollMode(VirtualScrollMode.Continuous); })
            .AllowScrolling()
            .AllowReordering()
            .AllowFiltering()
            .AllowResizing(true)
            .ToolbarSettings(tool => tool.ShowToolbar().CustomToolbarItems(new List<object> { new Syncfusion.JavaScript.Models.CustomToolbarItem()
            {TemplateID="#Add"},new Syncfusion.JavaScript.Models.CustomToolbarItem() {TemplateID="#Edit"},new Syncfusion.JavaScript.Models.CustomToolbarItem() {TemplateID="#Delete"}}))
            .ClientSideEvents(eve => { eve.ToolbarClick("ToolBarClick");eve.RowSelected("RowSelected");eve.RecordDoubleClick("RecordDoubleClick"); })
            .FilterSettings(filter => { filter.FilterType(FilterType.Excel); })
            .Columns(col =>
            {
                col.Field(p => p.media_id).HeaderText("Id").IsPrimaryKey(true).Width(50).TextAlign(TextAlign.Right).Add();
                col.Field(p => p.name).HeaderText("Nombre").TextAlign(TextAlign.Left).Add();
                col.HeaderText("Tipo").Template(true).TemplateID("#columnTemplate").TextAlign(TextAlign.Center).Add();
                col.Field(p => p.file_name).HeaderText("Nombre Archivo").TextAlign(TextAlign.Left).Add();

            }))


CONTROLLER:

public ActionResult DataSourceU(DataManager dm)
        {
            IEnumerable DataSource = this.GetRecords();
            int count = 0;
            DataOperations operation = new DataOperations();

            if (dm.Where != null && dm.Where.Count > 0)
            {
                DataSource = operation.PerformWhereFilter(DataSource, dm.Where, dm.Where[0].Operator);
            }
            count = DataSource.AsQueryable().Count();

            if (dm.Skip != 0)
            {
                DataSource = DataSource.AsQueryable().OrderByDescending("b_pos_id").Skip(dm.Skip);
            }
            if (dm.Take != 0)
            {
                DataSource = DataSource.AsQueryable().OrderByDescending("b_pos_id").Take(dm.Take);
            }

            return Json(new { result = DataSource, count = count }, JsonRequestBehavior.AllowGet);

        }

DE ANTEMANO MUCHAS GRACIAS.




1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team December 14, 2016 12:45 PM UTC

Hi Cesar, 
 
We are unable to reproduce the problem at our end. Please provide the following information to analyze the problem and provide you solution as early as possible. 
 
1)      Replication procedure for the issue.  
2)      Do you face any complication, while opening the excel filter or filtering the any specific columns? 
3)      Stack trace of browser console (if any error) and also explain the scenario 
4)      Screenshot for the issue 
5)      If possible, modify the attached sample and replicate the issue 
6)      Version of the Essential Studio 
 
Regards, 
Seeni Sakthi Kumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon