Override Dynamic Data Lists - liferay-6

I create a hook on "html/portlet/dynamic_data_lists/view_records.jsp" and add the following src code:
if(!editable && DDLRecordSetPermission.contains(permissionChecker, recordSet.getRecordSetId(), ActionKeys.VIEW)){
headerNames.add(StringPool.BLANK);
row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/dynamic_data_lists/record_action.jsp");
}
Now I get an additional column with the "view-option", if the permission for the DDL is set on "view".
Now the background color of the header-cell of this column is white and not grey like all other. Where can I change the color to grey?

You are adding extra column in row, but header column wont be added.
You have to add 
headerNames.add(StringPool.BLANK):
in existing code where header name list is defined to add extra header column.

Related

yii2-DynaGrid After changing attribute label, this column becomes hidden for all users

After changing class, header, label, or attribute.
Each user must go to "Personalize grid settings" and move this column to visible. I want to fix it automatically.
Create a migration
$this->execute("UPDATE dynagrid SET data = REPLACE(data, '6d674618', 'cdb49d00') WHERE id LIKE 'your-grid-id%'");
cdb49d00 - CRC32 hash key for new column label. Online service to encode it.
DynaGrid::getColumnKey() - here you can see how Column Key is generated. attribute/label/header/class

Adding border to ag-grid column groupings/ pivot

Is it possible to add a border to the pivot groupings (or possibly just column groupings) on ag-grid? My groups are quite wide and I'm using material theme which makes it hard to read the grid clearly.
There doesn't seem to be any api exposed or css class to use?
e.g. sum (gold) or whatever column is on the left of the group would have border-left css to demark from the previous group.
https://www.ag-grid.com/javascript-grid-pivoting/#example-simple-pivot
Try to add cellClass and headerClass.
Add CSS to this class and also to ag-header-group-cell-with-group.
Plunkr:
https://next.plnkr.co/edit/ZQ1rv0cwau99oarH

AG-Grid - Apply Style to Whole Column Dynamically?

I need to apply a background color to a whole column when a custom editor is opened on a cell. I am using:
const col = this.params.column.getColDef();
col.cellStyle = { 'background-color': 'yellow' };
But this is only affecting the cell currently being edited, and not the whole column, which is what I need. I'm using Angular 4+
You need to add this to your colDef for the column, as opposed to setting it dynamically, note that this property can also be a callback so you can dynamically adjust your styling.
https://www.ag-grid.com/javascript-grid-cell-styles/
https://www.ag-grid.com/javascript-grid-cell-editing/#editing-api

ListGrid with auto size - missing columns

I'm using smartgwt ListGrid. The problem appears when it's empty, and if i manually set columns width, i can get some columns clipped in the view port and there is no horizontal scrolling so I can't access them.
But if I add an empty record, the scrollbar appears. I've fixed it by adding
setAutoFitData(Autofit.HORIZONTAL);
setAutoFitMaxColumns(3000);
setOverflow(Overflow.AUTO);
But I need to add some freezed columns to my listGrid. I'd like to use setFrozen(true) method, but its not compatible with setAutoFitData(Autofit.HORIZONTAL);
What I need is
to show a scrollbar if columns are out of the view port, even when list grid is empty.
some first columns must be frozen.
Everything works with the base List Grid with no additional options. But when i set
setShowEmptyMessage(false);
my scrollbar disappears.
Kind of workaround i've found:
setShowEmptyMessage(true);
setEmptyMessage(" ");

Setting column style in FlexTable

I'm new to GWT and trying to understand it, but have encountered with a problem. When I try to add column style to the specified column in the table
table.getColumnFormatter().addStyleName(column, "columnStyle");
it doesn't take effect, but when I apply this style to each cell in the column
table.getCellFormatter().addStyleName(row, column, "columnStyle");
it works fine. Why I can not apply the style to the whole column?
It's possible that you're adding unsupported CSS elements to <col>, it only accepts backgrounds, width and borders CSS properties, whereas a <td> can accept many more.