Uncaught TypeError: Cannot read property 'indexOf' of undefined

Good morning,

My name is José Machado and I'm contacting beacuse of an error with ejGrid component.
I'm using a grid with excel filter, and when I open for the second time the "Text Filter" option of the filter menu box, after a focus out of the text field, it shows an error and it wont filter.

                       


5 Replies 1 reply marked as answer

PS Pon Selva Jeganathan Syncfusion Team December 17, 2020 02:51 PM UTC

Hi Jose,   
  
Thanks for contacting syncfusion forum.  
  

Query: Cannot read property 'indexOf' of undefined 

 

We have checked your reported problem by preparing sample but we are unable to reproduce the issue at our end. 

 

Please refer to the below sample: 

https://www.syncfusion.com/downloads/support/forum/160703/ze/WebApplication1-1510854279 

 

After following the above reference, still faced issue please share us the following details.  
  
1.        Share the Complete  grid code example.  
2.       If possible, reproduce the reported issue in the shared sample Or share us issue reproducing sample.  
3.       Kindly share us issue replicating steps.  
4.       Share the details of your product version.  
5.       Share the screenshot or video demonstrating the issue  
  
The provided information will be helpful to provide you response as early as possible.  

 

  
Regards,  
Pon selva   
 


Marked as answer

JP José Paulo Dinis Machado December 29, 2020 04:50 PM UTC

Good afternoon,

I already solved the problem that I had. The issue was with the jQuery version I using. 

Now I have another problem with ExcelFilter. When I filter a column that is type Nullable<short>, Nullable<long> and Nullable<decimal>, it returns an error.



PS Pon Selva Jeganathan Syncfusion Team December 30, 2020 07:07 AM UTC

Hi Jose  
   

Query: Excel Filter Problem  

   
We suggest you to set the data type of the column explicitly. When you bind the empty data source, Grid cannot find the actual data type of a column. So we set the data type of the column explicitly. Please Refer the below code example,   
   
           
    .FilterSettings(filter => { filter.FilterType(FilterType.Excel); })  
    .Columns(col =>  
     
    col.Field("OrderID").HeaderText("Order ID").Add();  
    col.Field("EmployeeID").HeaderText("Employee ID").Add();  
    col.Field("CustomerID").HeaderText("Customer ID").Add();  
    col.Field("Freight").HeaderText("Freight").Type("number").Add();  
    }))  
  
   
   
Please refer to the below KB documentation:   
   
Please refer to the below sample:   
  
  
Kindly get back to us for further assistance.   
   
Regards,   
Pon selva   
  




JP José Paulo Dinis Machado December 30, 2020 09:55 AM UTC

Good Morning, 

That worked! Thanks!

Have a nice day.


PS Pon Selva Jeganathan Syncfusion Team January 4, 2021 12:26 PM UTC

Hi Jose,   
  
Thanks for the update.    
  
We are glad to hear that query has been resolved by our solution.    
  
Kindly get back to us for further assistance.  
  
Regards,  
Pon selva  


Loader.
Up arrow icon