Results 1 to 2 of 2

Thread: Looking to embed html in a grid cell

  1. #1
    Touch Premium Member
    Join Date
    Apr 2011
    Posts
    5
    Vote Rating
    1
      0  

    Question Looking to embed html in a grid cell

    I'd like to know how to render the contents of a grid column's cells as html. The listed column configuration results in the cell contents being centered and html rendered as a string e.g. <div class="x-fa fa-thumbs-up"></div>.

    <Column
    text=""
    dataIndex="ApprovalStatus"
    width="100"
    renderer={value =>
    '<div ' + (value == 'Approved' ? 'class="x-fa fa-thumbs-up"' : (value == 'Disapproved' ? 'class="x-fa fa-thumbs-down"' : '')) + '></div>'
    }
    cell={{
    type:"gridcell",
    encodeHtml:false,
    align:"center"
    }}
    />


  2. #2
    Touch Premium Member
    Join Date
    Apr 2011
    Posts
    5
    Vote Rating
    1
      0  

    Default

    There was a type in my code that type should have been xtype.

    cell
    ={{
    xtype:"gridcell",
    encodeHtml:false,
    align:"center"
    }}


    The result is still the same. I'm not sure if this is the correct strategy for embedding html in a grid.

Similar Threads

  1. Embed a Extjs application in an HTML page
    By eamon250d in forum Ext: Q&A
    Replies: 3
    Last Post: 20 May 2014, 11:52 AM
  2. Label with embed HTML
    By becky99 in forum Sencha Touch 2.x: Discussion
    Replies: 1
    Last Post: 8 Oct 2013, 2:34 AM
  3. Embed HTML not working on iOS?
    By Reactor15 in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 24 Jan 2013, 3:05 PM
  4. Embed Ext JS in regular HTML table
    By ydoc in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Mar 2009, 6:48 PM

Tags for this Thread

Posting Permissions

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