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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

If grid has no data custom component in filter menu will not be rendered

Thread ID:

Created:

Updated:

Platform:

Replies:

151060 Jan 29,2020 03:15 PM UTC Jan 30,2020 12:51 PM UTC Blazor 2
loading
Tags: Grid
Admir Hodžic
Asked On January 29, 2020 03:18 PM UTC

Here is sample (copy/paste) from documentation page


@page "/"
@using Syncfusion.EJ2.Blazor.Grids
@using Syncfusion.EJ2.Blazor.DropDowns
   
       
           
               
                   
               
           
       
       
       
       
   
@code{
    public List Orders { get; set; }
    protected override void OnInitialized()
    {
        Orders = Enumerable.Range(1, 75).Select(x => new Order()
        {
            OrderID = 1000 + x,
            CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
            Freight = 2.1 * x,
            OrderDate = (new DateTime[] { new DateTime(2010, 5, 1), new DateTime(2010, 5, 2), new DateTime(2010, 5, 3), })[new Random().Next(3)],
        })
        .Where(x=> 1==2)
        .ToList();
    }
    public class Order
    {
        public int? OrderID { get; set; }
        public string CustomerID { get; set; }
        public DateTime? OrderDate { get; set; }
        public double? Freight { get; set; }
    }
}


All I did is added extra where clue (Where(x=> 1==2)) for returning empty list.
When this page is rendered filter template for GridColumn  OrderID is disabled, and user can't chuce filter anymore for this column.
(Strange behavior on grid is that FilterTemplate will be available if user filter some other column on grid).
Why it bothers me:
Because when user chooses "wrong" filter (filter which will return 0 records from data adapter) in column with Custom FilterTemplate  implemented:
He lock out grid , he is no more able to change filter he set in column with custom filter template.
Additional info:
My grid using custom adapter so we can do where operations  in sql , 
For that reason I want to have custom FilterTemplate items columns with values that does not exists in grid data.
But this opening solution to user pickup wrong combination of filters and get empty data for grid.

Admir Hodžic
Replied On January 29, 2020 03:21 PM UTC

Here is page file in txt, I do not know why I unable to post text with  markup in post

Attachment: Page_fb3ecb60.zip

Renjith Singh Rajendran [Syncfusion]
Replied On January 30, 2020 12:51 PM UTC

Hi Admir, 

Thanks for contacting Syncfusion support. 

We are able to reproduce the reported issue at our end and we have confirmed it is bug. Thank you for taking the time to report this issue Problem with rendering FilterTemplate in an empty Grid” and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming bi-weekly release which is expected to be rolled out on or before February 12, 2020.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  

Query : I do not know why I unable to post text with  markup in post 
Currently we don’t have the option to display the code snippet in the website. We have already logged this requirement as a feature and this will be available in any of our upcoming website release. 
 
Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon