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

Grid search returning rows without matches.

I have a data grid that is matching on fields that I'm not displaying in the grid results.
For example If I have the below class and grid, could I have the search ignore ImageURL?
public class SlideKit{
public string Title { get; set; }
public int Id { get; set; }
public string ImageURL { get; set; }
and I the grid:
.ToolbarSettings(toolbar => { toolbar.ShowToolbar().ToolbarItems(items => { items.AddTool(ToolBarItems.Search); }); })
.ScrollSettings(scroll => { scroll.Height(380); })
.Columns(col =>
col.HeaderText("PRESENTATION DETAILS").Add();

1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team November 16, 2016 11:20 AM UTC

Hi Patrick, 

Thanks for contacting Syncfusion support. 

Normally search operation perform the searching in Grid based on the given data source. If we give only 4 fields for presentation details and performing the search operation in Grid, then it searches the whole data source and returned matches rows in all fields instead of given 4 fields.  
So the input value has should be in result of the matched rows in any other fields. We can check the result the data after searching by call the getCurrentViewData() method in console window. We suspect this is cause of the issue and suggest you to use refer to the following code example for resolve this issue, 
Code example
        .ScrollSettings(scroll => { scroll.Height(380).Width(500); }) 
        .ToolbarSettings(toolbar => { toolbar.ShowToolbar().ToolbarItems(items => { items.AddTool(ToolBarItems.Search); }); }) 
        .Columns(col => 
           . . . 
    function ActionBegin(args) { 
        if (args.requestType == "searching") 
            this.model.searchSettings.fields = ["LastName", "FirstName", "Title"]; // here we can search the Grid with given fields. So it will returned the results only matched items. 

We have also created a sample for your convenience which can be download from following link, 
If you still face the same issue, then could you please provide following details? 
1)      Essential studio version details 
2)      Issue replication procedure. 
3)      Screenshot of Grid with search input. 
4)      Screenshot of search results. 
5)      A sample if possible or modify the given sample as issue reproducible. 

Venkatesh Ayothiraman. 

Live Chat Icon For mobile
Up arrow icon