[progress Communities] [progress Openedge Abl] Forum Post: Re: Hide Columns At Run-time

  • Thread starter Thread starter egarcia
  • Start date Start date
Status
Not open for further replies.
E

egarcia

Guest
Hello Bert, It is strange that the code you mentioned would prevent the module from being shown. Is the code called from the onShow event handler? (If you are using the debugger, the $scope variable should be available if it is referenced in the code.) Here is a sample of how the onShow handler would look like: onShow: function($scope, customData) { var that = this; this.scope = $scope; $scope.$on("kendoWidgetCreated", function(event, widget){ console.log("DEBUG: $scope: " + $scope); console.log("DEBUG: kendoWidgetCreated: " + widget.options.name); if (widget.options.name === "Grid") { angular.element("#grid0").data("kendoGrid").hideColumn(0); } }); }, Please notice that the code above checks widget.options.name to determine that the grid component is the widget that is being created. Here are some few links with references to kendoWidgetCreated: - docs.telerik.com/.../global-events - community.progress.com/.../29520 - documentation.progress.com/.../index.html The following two samples programs use a different approach to checking for a component being instantiated: - oemobiledemo.progress.com/.../GridWithFormJFP - oemobiledemo.progress.com/.../form-external-paging The 1st sample uses the dataBound event to select the first row on the grid. The 2nd sample uses $watch() to check when a combo-box component is instantiated. The source code for these sample projects can be found in GitHub: - github.com/.../kendo-ui-builder-samples I hope this information gets you in the right direction. Best regards, Edsel

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