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

Locked Columns using Angular

2 Answers 20 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 25 Aug 2015, 03:54 PM

Hi

I'm using the angular directive for the TreeList and am seeing some strange behaviour when trying to set one or more locked columns. My column definitions are read from a database and returned to the client as an array :

[
{ field: 'col0',
  fieldName: 'Name',
  title: 'Name',
  locked: true,
  width: 240
},
{ field: 'col1',
  fieldName: 'ID',
  title: 'ID',
  hidden: true,
  width: 120
}, 

...

]

This array is then assigned to the config.columns property at which point the treelist is instantiated (via the k-ng-delay="widgetCtrl.gridConfig.columns").Unfortunately the locked property seems to be being ignored.

Strangely if I remove the locked property from the returned array and replace it with a hardcoded value:

restService.genericApi(self.widget.url + 'columns', false).queryPost(json).$promise.then(function (defns) {
                                                     _defn = defns[0];
                                                     _defn.columns[0].expandable = true;
                                                     _defn.columns[0].locked = true;
 
                                                     self.gridConfig.columns = _defn.columns;
                                                 }, function (error) {
                                                 });

This does lock the first column but then I have serious issues resizing: the locked column works ok. If I try to resize the 2nd column, the 5th one changes. It's the same all the way across (i.e. column which resizes is +3).

Is this a known issue​? and if so, is there a workaround?

Thanks

Keith

2 Answers, 1 is accepted

Sort by
0
Keith
Top achievements
Rank 1
answered on 26 Aug 2015, 12:39 PM

Update on this... the resizing issue is NOT related to locked column. It is because I have 3 hidden columns​. For example:

 

Column0 : Visible
Column1: Hidden
Column2: Hidden
Column3: Hidden
Column​4: Visible

..

0
Dimo
Telerik team
answered on 28 Aug 2015, 05:46 AM
Hi Keith,

The resizing problem, which is caused by hidden columns was recently fixed and changes will take effect in the next internal Kendo UI build (usually we provide these on a weekly basis). Sorry for any inconvenience caused. A workaround is not available.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeList
Asked by
Keith
Top achievements
Rank 1
Answers by
Keith
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or