[progress Communities] [progress Openedge Abl] Forum Post: Grid With Custom Button

Status
Not open for further replies.
J

jts-law

Guest
All, I'm trying to add a custom button to a grid and I'm having trouble getting the function/method to run. I've tried a few ways with different results (none successful). The grid is setup within KUIB. 1. Add button using template. This way generates an error "Uncaught ReferenceError: resequence is not defined": [ Inside $watch for grid ] grid.options.toolbar.push( { name: "resequence", template: " Resequence ", }); 2. Add button using "click" property. This way causes 4 state changes to default.module.application.home followed by 3 "Error: transition superseded" exceptions. [ Inside $watch for grid ] grid.options.toolbar.push( { name: "resequence", text: "Resequence", click: (e) => { return this.resequence(e); }, }); 3. Add button with no event, then find button and bind to onClick. This way also causes 4 state changes to default.module.application.home followed by 3 "Error: transition superseded" exceptions. [ Inside $watch for grid ] grid.options.toolbar.push( { name: "resequence", text: "Resequence", }); let removeBtnReseqWatch = $scope.$watch(() => { return angular.element("#gridTotals > div.k-grid-toolbar > a.k-button.k-grid-resequence"); }, (btn) => { if (btn && btn.length >= 1) { btn.bind("onClick", (e) => { this.resequence(e); }); removeBtnReseqWatch(); } }); How do we add custom buttons to an existing grid in KUIB 2? Louis

Continue reading...
 
Status
Not open for further replies.
Top