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

How to add Grid searching feature

Thread ID:

Created:

Updated:

Platform:

Replies:

143083 Mar 4,2019 12:43 PM UTC Mar 7,2019 08:59 AM UTC Vue 3
loading
Tags: Data Grid
sundar sambandam
Asked On March 4, 2019 12:43 PM UTC

Hi there,

May I know how to add search feature in VueJS sync fusion grid. I cannot see any demo. 
But there is one for ReactJS.
https://ej2.syncfusion.com/react/demos/?_ga=2.241332295.49332759.1551689409-1997588708.1548674747#/material/grid/searching

could you please forward me a example for VueJs?

Thanks
Sundar 

Pavithra Subramaniyam [Syncfusion]
Replied On March 5, 2019 07:03 AM UTC

Hi sundar, 
 
Greetings from Syncfusion. 
 
You can add the default Searching feature by simply adding “Search” to the Grid toolbar items. Please refer to the below code example, Documentation link and sample link for more information. 
 
[vue] 
<template> 
<div class="col-lg-12 control-section"> 
    <div> 
        <ejs-grid :dataSource="data" :allowPaging="true" :pageSettings='pageSettings' :toolbar='toolbar'> 
            <e-columns> 
                <e-column field='CategoryName' headerText='Category Name' width='150'></e-column> 
                <e-column field='ProductName' headerText='Product Name' width='150'></e-column> 
            </e-columns>     
        </ejs-grid> 
    </div> 
 
 
</div> 
</template> 
<script lang="ts"> 
import Vue from "vue"; 
import { GridPlugin, Page, Toolbar } from "@syncfusion/ej2-vue-grids"; 
import { categoryData } from "./data-source"; 
 
Vue.use(GridPlugin); 
 
export default Vue.extend({ 
  data: () => { 
    return { 
      data: categoryData, 
      pageSettings: { pageCount: 5 }, 
      toolbar: ["Search"] 
    }; 
  }, 
  provide: { 
      grid: [Page, Toolbar] 
  } 
}); 
</script> 
 
Also Grid has an option to search its content using the search() method with search key as the parameter. 
 
 
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 


sundar sambandam
Replied On March 6, 2019 09:29 AM UTC

Thank you Pavithra,
I like to search in the existing record set. It looks like the demo is going to new data request with search criteria.
Is it possible filter or search the existing record set?





Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 7, 2019 08:59 AM UTC

Hi Sundar, 

Greetings from Syncfusion. 

Based n your query we suspect that you want to do filtering with existing record set in Grid. We already have filtering feature with Grid and you can check the documentation/demo in the following link. 


    
Please let us know if you need further assistance on this. 

Regards, 
Thavasianand S. 


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

;