View Full Version : Help to add a new row to a GridPanel
Hi,
I need your help to add a new row to GridPanel when a button is clicked.
And this row should have a hyperlink in one of the cell.
Thanks in advance:)
maybe, some like this:
function(btn, ev) {
var u = new store.recordType({
name: '',
description : ''
});
grid.stopEditing();
store.insert(0, u);
grid.startEditing(0, 1);
}
vishalnnsingh
9 Sep 2010, 8:34 PM
to have a hyperlink just add <a href='vhgvd.html'>Your Hyperlink</a>
var defaultData = {
name:'jbj',
description:'jh',
//your 3rd column
yourhyperlink:'<a href='vhgvd.html'>Your Hyperlink</a>'
};
var u = new store.recordType(defaultData);
rest has been said in teh above post
Condor
9 Sep 2010, 11:05 PM
var rec = new store.recordType({
field1: 'value1',
field2: 2,
field3: 'http://www.google.com'
});
store.add(rec);
and write a renderer for the column of field3 to show the value as a hyperlink, e.g.
renderer: function(v) {
return '<a href="' + v + '">' + v + '</a>';
}
Powered by vBulletin® Version 4.2.3 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.