Results 1 to 4 of 4

Thread: Display text next to image in ActionColumn?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2007
    Posts
    148

    Default Display text next to image in ActionColumn?

    Is there a way to display the record value next to the image in an ActionColumn?

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    It does not use a dataIndex. But it will use a configured renderer to create the initial cell content, so

    Code:
                    renderer: function(v, m, rec) {
                        return rec.get('theFieldYouWant');
                    },
    You'll have to tweak the CSS.

  3. #3
    Sencha User
    Join Date
    Nov 2007
    Posts
    148

    Default

    I added the renderer code and the text ended up on the left side of the image and at the bottom of the grid cell.

    I want the text on the right side of image with a bit of space between the image and the start of text. Is it possible to change the order with a CSS tweak?

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    You'll have to create a subclass who's renderer member function calls the superclass render, and then appends to the result of that.

Similar Threads

  1. [SOLVED] Dataview display some image - on event click how to know which image ?
    By Etienne Jouvin in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 7 Feb 2011, 4:46 AM
  2. CheckboxSelectionModel->display checkbox image and text in header
    By qgj2046 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 8 Apr 2009, 6:08 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
  •