Results 1 to 6 of 6

Thread: Renderer for cell editor

  1. #1

    Default Renderer for cell editor

    Hello,

    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.

    Thanks

  2. #2
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Hi max.carvalho,

    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!

  3. #3

    Default

    Hi,

    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!

  4. #4
    Sencha Premium User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    135

    Default

    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.

  5. #5

    Default

    Ok, thank for you both

  6. #6
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    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.

Similar Threads

  1. Grid editor intercept cell event and hide another cell
    By ddxt in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 3 Nov 2009, 3:59 AM
  2. EditorGridPanel > editor: > How to make the editor dynamic for each cell
    By srajakaruna in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 9 Oct 2008, 7:53 AM
  3. Quicky: editor grid cell editor focus
    By almerelc in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Apr 2008, 9:09 PM

Posting Permissions

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