-
8 Jun 2009 2:34 AM #531
selecting fields and text to search
selecting fields and text to search
i need to select in grid A containing the search plugin only one search parameter, fill the search field with a value coming from a grid B in a "pop up window" and trigger the search plugin in grid A by script from row doubleclick from grid B.
hopefully someone can understand what i need. any ideas?
regards
-
8 Jun 2009 10:47 AM #532Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
8 Jun 2009 10:19 PM #533
thx a lot. i was digging around in the plugin code to find something. but i'm using a kind of very old version. so that field wasn't available. i think an update is needed and recommended.
btw. great work
-
18 Jun 2009 12:40 PM #534
I am sure there is a better way to do this, but this is the first time i've tried to add to an extension.
The goal was to allow the search bar to be moved off the grid so it could support different layouts.
In the onRender function of Ext.ux.grid.Search.js I added:
In the grid I do not have a tbar or bbar defined and I define this in my grid as:Code:if (tb == undefined) { tb = Ext.getCmp(this.newLocation); }
Seems to be working fine for me, thoughts?Code:plugins:[new Ext.ux.grid.Search({ iconCls:'icon-zoom', minChars:2, position:top, autoFocus:true, newLocation: 'statusBar' })],
-
18 Jun 2009 1:32 PM #535
Any live demo? Sounds interesting and useful.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
19 Jun 2009 5:37 AM #536
Is there anyway to combine the search box with title bar in grid?
I want to add search box on next to title of the grid, instead of on toolbar.
I hope my question is clear
Thanks,
Sri
-
19 Jun 2009 5:50 AM #537
No, the plugin is for top or bottom toolbar.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
19 Jun 2009 6:08 AM #538
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
22 Jun 2009 1:11 PM #539
No demo sorry, pretty easy to implement though for anyone that wants to play =). As for use I have the search box coming up in a bar at the bottom of a panel that controls a number of actions for items in the panel (one of the items being a grid). Just for aesthetics mainly, the way my interface was designed it looks odd to use tbar or bbar.
-
24 Jun 2009 1:58 PM #540
Other items that I added that were nice was a id field and a hidden field, this gave me the ability to hide the searchField and the searchButton. This is not as clean as it could be, but I hope it gives ideas to people.
I have multiple grids in an accordion and save the header of the accordion to create unique values for the buttons.Code:// add menu button tb.add({ id: 'searchButton' + this.id, hidden: this.hidden, text:this.searchText, menu:this.menu, iconCls:this.iconCls }); .... this.field = new Ext.form.TwinTriggerField({ id: 'searchField' + this.id, hidden: this.hidden, width:this.width, selectOnFocus:undefined === this.selectOnFocus ? true : this.selectOnFocus, trigger1Class:'x-form-clear-trigger', trigger2Class:this.minChars ? 'x-hide-display' : 'x-form-search-trigger', onTrigger1Click:this.onTriggerClear.createDelegate(this), onTrigger2Click:this.minChars ? Ext.emptyFn : this.onTriggerSearch.createDelegate(this), minLength:this.minLength });
Plugins:Code:grid.searchButtonId = 'searchButton' + store.getAt(i).get("accordionHeader"); grid.searchFieldId = 'searchField' + store.getAt(i).get("accordionHeader");
On the expand and collapse functions of the accordions parent I add:Code:plugins:[new Ext.ux.grid.Search({ iconCls:'icon-zoom', minChars:2, autoFocus:true, id: store.getAt(i).get("accordionHeader"), hidden: true, newLocation: 'generalStatusBar' }), expander],
Had to add a check of searchButtonObject since the default state of the accordion is collapse, dont need to fire that off at the start.Code:'expand': function (p) { Ext.getCmp(p.items.get(0).searchButtonId).show(); Ext.getCmp(p.items.get(0).searchFieldId).show(); }, 'collapse': function (p) { var searchButtonObject = Ext.getCmp(p.items.get(0).searchButtonId) if (searchButtonObject != undefined) { Ext.getCmp(p.items.get(0).searchButtonId).hide(); Ext.getCmp(p.items.get(0).searchFieldId).hide(); } }
Hope this makes since, I had to change alot of code for posting.
What this has given me is several grids in an accordion layout, if you expand an item in the accordion with a grid the search button and text field are added to generalStatusBar, if you collapse the item the search button and text field are removed.


Reply With Quote
