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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Undefined generated in search query using Grid

Thread ID:





142580 Feb 11,2019 07:58 AM UTC Feb 12,2019 09:15 AM UTC JavaScript - EJ 2 1
Tags: Grid
Asked On February 11, 2019 07:58 AM UTC

using the grid , and webapi and webapi adapter, I tried to search and the following query was generated
which failed on getting into the webapi controller 
  1. Request URL:

  2. Any way to prevent query from including undefined , like just leaving it out , or what can i do different to fix this. Thank you

Thavasianand Sankaranarayanan [Syncfusion]
Replied On February 12, 2019 09:15 AM UTC

Hi Samuel, 

Greetings from Syncfusion. 

We have analyzed your query. We could see that the “undefined” values shown in “RawValue” is for the “checkbox” column, since the field property will not be provided for the “checkbox” column, its showing as undefined. We suggest you to push only the columns to the “searchSettings.field” property to avoid undefined in query(only the columns in “searchSettings.field” will be included during searching). Please refer the code below, 

    var grid = new ej.grids.Grid({ 
        dataSource: new ej.data.DataManager({ 
            url: "/api/Values", 
            adaptor: new ej.data.WebApiAdaptor(), 
            crossDomain: true 
            if (args.requestType == "searching") { 
                for (var i = 0; i < this.getColumns().length; i++) { 
                    if (this.getColumns()[i].field) { 
                        this.searchSettings.fields.push(this.getColumns()[i].field)    //These columns fields will only be included in searching. So  

Documentations :  
We have prepared a sample based on this scenario to perform searching in Grid when bound data with “WebApiAdaptor”. We are attaching the sample for your convenience. Please download the sample from the link below, 

We would also like to suggest you to refer to the “controller” code section of the below KB link, in which we have included the code to perform server side “searching” when using Web API service. 
Please get back to us if you need further assistance. 

Thavasianand S. 


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