Jason90
(Jason Stanley)
1
is setting the header content still supported? Here is how i am setting and name is always in the header
this.$.grid.addColumn(
{
name: columnDef.metadataKey.fieldName,
sortable: true,
headerContent: “Something other than name”
}
);
also tried
‘this.$.grid.columns[index]
.headerContent = “SOMETHING OTHER THAN NAME”;’
[i]
[i]
[/i]
[/i]
Jouni1
(Jouni Koivuviita)
2
Jason90
(Jason Stanley)
3
cool thx, its still in the new API documentation here https://cdn.vaadin.com/vaadin-core-elements/latest/vaadin-grid/ for the column object
Jouni1
(Jouni Koivuviita)
4
Well that’s embarrasing… thanks for pointing it out!
I removed it from master
. I’ll ask someone to update the online docs also.
Sauli2
(Sauli Tähkäpää)
5
Docs at
https://cdn.vaadin.com/vaadin-core-elements/latest/vaadin-grid/
are now also updated accordingly. (might take a few hours for the caches to update)
hi, all!
thank
This post has saved my life
if you need past my code in angular 2
for (var col in this._columns) {
this.el.nativeElement.addColumn({ name: this._columns[col]
});
this.el.nativeElement.columns[col]
.sortable = true;
if (this._columns[col]
=== ‘novelty’) {
// Add a renderer for the picture column
this.el.nativeElement.columns[col]
.renderer = function(cell) {
// PUBLISHED
if (cell.data === true) {
cell.element.innerHTML = ‘
’;
}
// UNPUBLISHED
else{
cell.element.innerHTML = ‘
’;
}
}
}
this.el.nativeElement.header.getCell(0, col).content = this._translate.instant('contents.grid.' + this._columns[col]
);
}