Search code examples
extjspropertygrid

HyperText in PropertyGrid ExtJS


I want to display a value in property grid as a hyperlink...

(Assume below is a record in propert grid)

propertname | propertyvalue

How can I achieve this??

Thanks in advance...


Solution

  • Take a look at the renderer property on the grid column in the docs => http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.grid.Column-cfg-renderer

    So assuming the property value is already a url, you could do something like this:

    renderer: function(value, metaData, record, rowIndex, colIndex, store) {
    
          return String.format("<a href='{0}'><a/>", record.get('yourfieldnamehere'));
       }