View Full Version : Renderer for cell editor
10 Sep 2010, 5:59 AM
I have a editor grid that was made with Ext Designer. This editor grid have a combobox cell editor with have a remote store. I need to put a renderer to display text but, I dont know how to do this with the Ext Designer.
13 Sep 2010, 7:36 PM
You can do this two ways:
1) The preferred way is to use a TemplateColumn instead of a renderer.
2) Right-click on your column and go to "Promote to Class", which will make the Column it's own class file on project export. You can then add the renderer method to the prototype of the Column class in the .js file.
Hope that helps!
14 Sep 2010, 3:58 AM
First thanks for the reply.
Second, in case of the 1st way (TeamplateColumn), I still have to do a research in a 2nd table to get the value I need.
Its something like:
table clients -> column state holds the ID of a state
table states -> column stateName holds the name of the state
what I need is, do a research in the state table passing the ID that is in the clients table.
Is that any way to do that using a simple database query, I mean, without JOIN?
Thanks again man!
8 Oct 2010, 5:25 AM
I think if you have to do complex rendering the right solution is the second.
When you extend the coloumn class you can add an ajax request and receive the details from your states table.
8 Oct 2010, 6:09 AM
Ok, thank for you both
8 Oct 2010, 7:27 AM
What if you returned the state details (i.e. stateName) along with your client data in your JSON response? In other words, do the join on the server-side and return everything you'll need for the client-side. The only time I wouldn't do that and instead do an asynchronous "on-demand" query of state information, is if that query was an expensive operation.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.