|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
is it possible to attach the Ext.Button in columnModel?
if possible can you show me example.. tnx! i'm new here and this library is great! tnx! |
|
#2
|
||||
|
||||
|
Instead of putting a button in the grid, why not use a toolbar and act on the selected row(s)?
__________________
Jeff Howden Ext JS - Support Team Volunteer jeff@extjs.com Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise. Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me. |
|
#3
|
||||
|
||||
|
Use a custom renderer for that column. In the render function create a span with a generated id, and set off an onAvailable on that id to create the Button.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#4
|
||||
|
||||
|
i've tried this one..
....
},{
header: "Edit",
width: 50,
sortable: true,
renderer: myButton = function(){return '<span id="edit"></span>';}
},{
...
....
btnEdit = new Ext.Button('edit',{text: 'edit'});
...
[/code] |
|
#5
|
||||
|
||||
|
Well of course. That's why I said to set off an onAvailable wait.
There's no element with an id of "edit" until the renderer has been called to create the data cell.... And then there will be many - one in each row! Which is why I also said generate an id.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#6
|
||||
|
||||
|
Actually, I'm new with this library, and I started a project using this one..
I have no idea how can i generate an ID and about the onAvailable event. I'll be thankful if you can give me some example.. Thanks!! |
|
#7
|
||||
|
||||
|
if you have a lot of rows and you want to create a button for each row it might not be practical to attach events to wait for each id onavailable.
another suggestion is to bind a custom css classname to that column and use domquery to select all the cells after the grid is rendered. |
|
#8
|
||||
|
||||
|
What is the purpose of these buttons?
__________________
Jeff Howden Ext JS - Support Team Volunteer jeff@extjs.com Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise. Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me. |
|
#9
|
||||
|
||||
|
The documentation is 80% there, and the bits you need are all there.
http://www.yui-ext.com/deploy/ext-1.0-alpha3/docs/ See the Ext base class, specifically Ext.id() Docs about the YAHOO foundation classes are on the old docs page (Don't use this page for info about Ext), but hopefully they will be included in the official release os Ext 1.0: http://www.yui-ext.com/deploy/yui-ext/docs/ You will need to find YAHOO.util.event.onAvailable()
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#10
|
||||
|
||||
|
When the button was click it will launch a dialog for editting of the contents
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to activate a cell editor based on another cell? | kimu | Ext 2.x: Help | 2 | 05-21-2008 03:01 PM |
| Display a button in a cell. | dmayer | Ext 1.x: Help | 3 | 09-21-2007 12:04 AM |
| Click handler for grid's refresh button | SLerman | Ext 1.x: Help | 2 | 02-22-2007 10:52 AM |
| dialog(s) called from button on cell(s) in grid | mcrusty | Ext 1.x: Help | 1 | 01-26-2007 03:28 AM |
| Grid: append cell dom object before rendering cell | ericwaldheim | Ext: Feature Requests | 7 | 12-01-2006 04:50 PM |