Add a hyperlink to the URL column in the grid so that you can click it. Code: functionshowUrl (value) {return & quot; & lt; ahref & quot; + value + & quot; & gt; & quot; + value + & quot; & lt; /a & gt; & quot;} Ext. onReady (function ()
Add a hyperlink to the URL column in the grid so that you can click it.
Check the Code:
Function showUrl (value)
{
Return "" + value + "";
}
Ext. onReady (function (){
Var data = [
{Id: 1, name: 'easyjweb', organization: 'easyjf', homepage: 'www .Easyjf.com '},
{Id: 2, name: 'jfox', organization: 'huihoo ', homepage: 'www .huihoo.com '},
{Id: 3, name: 'jdon ', organization: 'jdo', homepage: 'www .jdon.com '},
{Id: 4, name: 'springne', organization: 'springne', homepage: 'www .springside.com '}
];
Var store = new Ext. data. JsonStore (
{
Data: data,
Fields: ['id', 'name', 'organization', 'homepage']
}
);
Var colM = new Ext. grid. ColumnModel (
[
{Header: 'Project name', dataIndex: 'name', sortable: true },
{Header: 'Development team', datIndex: 'organization', sortable: true },
{Header: 'website', dataIndex: 'homepage', renderer: showUrl}
]
);
Var grid = new Ext. grid. GridPanel ({
RenderTo: 'hello ',
Title: 'Open-source java products and team ',
Height: 200,
Width: 600,
Cm: colM,
Store: store,
AutoExpandColumn: 2
});
});
Author: howlaa