Question
Override the Section Open record button and the Name link
16:01 Mar 18, 2019
Hi Community,
Any idea how can I override the Open section record button and the Name Link on section?
Like
1 comments
09:35 Mar 19, 2019
Hi Fulgen,
You can try overriding the button in the diff section:
diff: /**SCHEMA_DIFF*/[
{
// values from parent, replacing and replaced schemes merge together,
// the "values" parameter properties of the last inheritor have priority
"operation": "merge",
"name": "DataGridActiveRowOpenAction",
"parentName": "DataGrid",
"propertyName": "activeRowActions",
"values": {
"className": "Terrasoft.Button",
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
// new caption
"caption": "Test",
// new tag that will call the custom method
"tag": "test"
}
},
]/**SCHEMA_DIFF*/
in the "methods" section, override the onActiveRowAction parent method(buttonTag, primaryColumnValue) .
onActiveRowAction: function(buttonTag, primaryColumnValue) {
// calling the method implementation from the
this.callParent(arguments)base schema;
// adding the button custom tag that calls the custom method
switch (buttonTag) {
case "test":
this.testFunction(primaryColumnValue);
break;
}
},and add the testFunction() method with new functionality
Show all comments