Grid column width



Maybe this is covered somewhere else however I was not able to find it. Given the following situation: This is a product with a field “Elementen” this is displayed as a grid however the key column is rather small. Is there a way to configure the width of this column somewhere so that I dont have to drag everytime to change the column width. I read somewhere that it is possible to export grid column configuration but I could not find where (

With kind regards, Edwin Jacobs



it seems like this is a multihref with metadata element. The key column is not a metadata column right?

According to the code:

columns.push({text: 'ID', dataIndex: 'id', width: 50});
        columns.push({text: t('reference'), dataIndex: 'path', flex: 1});

        for (i = 0; i < this.fieldConfig.columns.length; i++) {
            var width = 100;
            if(this.fieldConfig.columns[i].width) {
                width = this.fieldConfig.columns[i].width;

The “reference” column which is the path or the formatted path, using a path formatter, is a flex column und should expand to the remaining width. The id is a fixed width of 50px and each metadata column can be configured in the class-editor.




Thanks for the reply. The type of field is an object reference (object with Metadata?) based on that I found that in objectMetadata.js the following happens:

objectMetadata.js (web/pimcore/static6/js/pimcore/object/tags/objectMetadata.js)
for (i = 0; i < visibleFields.length; i++) {
if (!empty(visibleFields[i])) {
var layout = this.fieldConfig.visibleFieldDefinitions[visibleFields[i]];

            var field = {
                key: visibleFields[i],
                label: layout.title == "fullpath" ? t("reference") : layout.title,
                layout: layout,
                position: i,
                type: layout.fieldtype

            var fc = pimcore.object.tags[layout.fieldtype].prototype.getGridColumnConfig(field);

            fc.width = 100;
            fc.hidden = false;
            fc.layout = field;
            fc.editor = null;
            fc.sortable = false;



The line fc.width = 100 is fixed, hence it seems that it is not possible (except for code overrides) to configure this. Is there a nice way to extend this js? (I am rather new to pimcore)





Thanks again,

I fixed my issue with the following code (registered in an appropriate bundle)

pimcore.object.tags.objectsMetadata = Class.create(pimcore.object.tags.objectsMetadata, {

createLayout: function ($super, readOnly) {

    let layout = $super(readOnly);
    let visibleFields = this.fieldConfig.visibleFields.split(",");

    Ext.each(layout.getColumns(), function(column) {
        let columnId = column.config.dataIndex;
        if (!Ext.Array.contains(visibleFields, columnId)) {



    return layout;



Maybe you should also try creating a PR on github for that, guess that should be configurable in the backend.