Detail with editable list - block edition on the field

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?

http://prntscr.com/kd46x3

Like 0

Like

3 comments

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;
					},

 

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

Sollved by removing the '&&' and left just 1 & instead

Show all comments