Results 1 to 3 of 3

Thread: Search in the JSON Store Grid

  1. #1
    Sencha User
    Join Date
    Jul 2013

    Default Search in the JSON Store Grid


    I have grid loading data using JSON store.

    var store = new{
    root: 'topics',
    totalProperty: 'totalCount',
    idProperty: 'threadid',
    remoteSort: true,
    //url: '',
    fields: [
    'title', 'forumtitle', 'forumid', 'username',
    {name: 'replycount', type: 'int'},
    {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
    'lastposter', 'excerpt'
    proxy: new{
    url: '/apps/FusionChartConsole'
    store.setDefaultSort('lastpost', 'desc');

    now the store has 25 records as i implemented paging grid. I want to search these 25 records using the fieldname and reload the store only the matching records among 25.

    i just put the below line in search button click event. But it is not working.

    i stuck in these whole day. Help me out of this..

  2. #2
    Sencha User
    Join Date
    Jan 2011


    If you're only wanting to search amongst the currently loaded records, then surely you could just filter the store, rather than reloading it?

    This way you don't need an additional call to the DB.

  3. #3
    Sencha User
    Join Date
    Jul 2013


    This is worked for me.
    grid.getStore().filter('employee', new RegExp("^"+schFiled.getValue()+"$"));

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts