1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    buhari is on a distinguished road

      0  

    Default Unanswered: 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,580
    Vote Rating
    1136
    Answers
    3708
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    what do you mean by drop down grid column?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    buhari is on a distinguished road

      0  

    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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,580
    Vote Rating
    1136
    Answers
    3708
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    I'm not sure the UI you want.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    64
    Vote Rating
    5
    Answers
    6
    AssetWorks is on a distinguished road

      0  

    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
    Vote Rating
    1
    rupamkhaitan is on a distinguished road

      0  

    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
    Vote Rating
    5
    Answers
    6
    AssetWorks is on a distinguished road

      0  

    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/