Hello Community!
I need block the edition of one field in a detail list. I try:
attributes: { // Determines whether the editing is enabled. "IsEditable": { // Data type — logic. dataValueType: Terrasoft.DataValueType.BOOLEAN, // Attribute type — virtual column of the view model. type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN, // Set value. value: true }, "UsrPorcentaje": { enabled: false } },
but not works. Any idea?
Like
3 comments
02:00 Aug 01, 2018
Solved adding the function:
getCellControlsConfig: function(entitySchemaColumn) { debugger; if (!entitySchemaColumn) { return; } var columnName = entitySchemaColumn.name; var enabled = (entitySchemaColumn.usageType !== this.Terrasoft.EntitySchemaColumnUsageType.None) && !this.Ext.Array.contains(this.systemColumns, columnName); var config = { itemType: this.Terrasoft.ViewItemType.MODEL_ITEM, name: columnName, labelConfig: {visible: false}, caption: entitySchemaColumn.caption, enabled: enabled }; if (columnName === "MyColumn") { config.enabled = false; } if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP{ config.showValueAsLink = false; } if (entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.DATE_TIME && entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.BOOLEAN) { config.focused = {"bindTo": "Is" + columnName + "Focused"}; } return config; },
00:06 Jun 21, 2022
Federico Buffa,
Hi Frederico or anyone else,
Can you please provide more details on the function you added?
I tried coping it but get compiler error for those: '&&'
I need the exact same thing you were trying to do, if you can help it will be very helpful.
Thanks,
Chani
Show all comments