Results 1 to 7 of 7

Thread: Building a dynamic search on grid panel

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    3

    Default Building a dynamic search on grid panel

    Hi everyone,

    I have been working on a search component to be build around a grid panel that will dynamically drop down grid column as its menu item and search the records in the grid without success.

    Please your assistance is highly appreciated.

    Thanks

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    what do you mean by drop down grid column?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    3

    Default

    For instance if I have a grid with name, department, faculty, grade as the column, the search component should dynamically use these as its items to look up the table. The search should be pluggable to any grids

    Thanks for you anticipated support.

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    I'm not sure the UI you want.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    64
    Answers
    6

    Default

    Are you saying that you want a search bar that would filter your store by the all the fileds(columns) in your grid?

    if so...
    Code:
    filterStore: function(searchtext){  
    		grid.store.filterBy(function(r){
    			var val = searchtext.getValue().toLowerCase();
    			var rec = r.get('Attribute').toLowerCase();
    			return rec.indexOf(val) > -1;
    		});
    			
    	}

  6. #6
    Sencha Premium Member
    Join Date
    Nov 2012
    Location
    Bangalore
    Posts
    79

    Default

    In the code do you dynamically pass Attribute?
    I mean i want minimal code which goes and look all the columns inside a grid and match with the search text

  7. #7
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    64
    Answers
    6

    Default

    at the moment I'm only using this search on a grid with one column so I never needed to do that, however, have you seen saki's gridsearch plugin?
    http://gridsearch.extjs.eu/

Posting Permissions

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