Results 1 to 2 of 2

Thread: Grid Renderer - HTML? In Modern

  1. #1
    Sencha User
    Join Date
    Feb 2017
    Posts
    0
    Vote Rating
    0
      0  

    Default Grid Renderer - HTML? In Modern

    Using the latest version of Ext and Architect and building a Modern app.

    I can't seem to configure an Ext.grid.column.Column it to format html no matter what I do.

    + I tried to import data that had <b>test</b> and it displays <b>test</b>
    + I tried to use a renderer function like so:
    renderer: function(value, record, dataIndex, cell, column) {
    return '<b>'+record.data.fieldName+'</b>';
    })
    and again received simply the unformatted HTML tags/code.
    + I tried setting the config option for StyleHtmlContent set to true on both the grid and the column.

    Is this a modern drawback or am I doing something wrong?

  2. #2
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Answers
    103
    Vote Rating
    52
      0  

    Default

    Hi

    Just quick response, you should be able to style the cell with the config cell and style like this:

    Code:
    {
            xtype: 'gridcolumn',
            width: 120,
            dataIndex: 'name',
            text: 'Name',
            // cell style
            cell: {
                style: 'font-weight: bold'
            }
        }
    https://fiddle.sencha.com/#view/editor&fiddle/1tbl

    Also I think that in this example there is custom cell style http://examples.sencha.com/extjs/6.2...#big-data-grid

Similar Threads

  1. Replies: 5
    Last Post: 23 May 2017, 12:06 AM
  2. Replies: 5
    Last Post: 18 Oct 2016, 7:46 AM
  3. Grid column renderer with html tag
    By paipai in forum Ext: 4.x Beta
    Replies: 3
    Last Post: 24 Jan 2013, 7:09 AM
  4. Grid renderer with HTML couses editing problems!
    By countdown in forum Ext 3.x: Bugs
    Replies: 0
    Last Post: 28 Jan 2011, 3:32 AM
  5. Returning an element instead of HTML from Ext.grid.Column.renderer()?
    By tysontate in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 14 Jul 2010, 10:36 AM

Posting Permissions

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