This is a migrated thread and some comments may be shown as answers.

Custom angular column editor stops working after calling setOptions

2 Answers 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 11 Nov 2015, 09:18 PM

 Hello,

 I have run into a problem with calling setOptions on the grid if I am using a custom angular column editor.

 Before calling setOptions the editor works correctly, once setOptions is called it stops displaying the custom editor.

 I have verified that the function that sets the custom editor is called and executes the same way as it did before running setOptions.

 I created the following Dojo that reproduces the problem I am having: http://dojo.telerik.com/IDOCu/2

 Steps to reproduce:

  1. Click in one of the category fields to ensure that the angular control is created and working properly.
  2. Click the "Set Options" button above the grid.
  3. Click in one of the category fields again, and notice that the angular control is not created this time and is only showing input control.

Thanks in advance for any help you can provide,

Sean

2 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 16 Nov 2015, 09:09 AM
Hello Sean,

Current behavior is expected as you are not passing the angular scope to the Grid options (which is set by default when the Grid is initialized). Please check the example below how to pass the scope :

$scope.setOptions = function() {
    $scope.grid.setOptions($.extend({}, $scope.mainGridOptions, {
        $angular: [$scope]
    }));
};

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Sean
Top achievements
Rank 1
answered on 16 Nov 2015, 01:47 PM

Thank you so much. That solved my problem.

 Sean

Tags
Grid
Asked by
Sean
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Sean
Top achievements
Rank 1
Share this question
or