PDA

View Full Version : Grid Element With format TAGS and ORDER



lag_0
25 Jan 2008, 4:27 AM
I need implement HTML tag's for colour, bold, and underline in some elements in a grid, this elements is dinamically, because I print in grid with PHP.

Problem: If I put HTML tag's, elements not order OK, because interpretate <font... as text...

Condor
25 Jan 2008, 4:34 AM
Don't put the markup in the data!

Instead add a renderer function to the column model that adds a class to the metadata.

lag_0
25 Jan 2008, 4:36 AM
Yes... problem is data is dinamic, and not always is equal format for a mismatch Column... :((

Condor
25 Jan 2008, 4:37 AM
Then add extra fields to your record (that are not in the column model) and use their data in the renderer function to determine the markup.

lag_0
25 Jan 2008, 4:41 AM
Its posible... so... I only render by column....

{id:'#',header: "<b>#</b>", width: 30, sortable: true, renderer: change, dataIndex: '#'},
{header: "Nombre", width: 120, sortable: true, renderer: change, dataIndex: 'Nombre'},
{header: "FORMAT", width: 120, sortable: true, renderer: change, dataIndex: FORMAT'}


function change(val){
return '<span style="cursor:pointer;" onmouseover="javascript:subray(this);" onmouseout="javascript:dissubray(this);">' + val + '</span>';
return val;
}

:-?:-?:-?:-?