EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: zolotoy on July 03, 2015, 02:56:30 PM



Title: Same data field for two columns in TreeGrid
Post by: zolotoy on July 03, 2015, 02:56:30 PM
I have the following columns in TreeFrid:
Code:
columns: [[
                       { field: 'name', title: 'Name' },
                       [b]{ field: 'category', title: 'Alarm State', align: 'center', formatter: scope.formatAlarmState },
                       { field: 'category', title: 'Alarm Category', align: 'center' },[/b]
......

As you can see I am using same field for two different columns. In first column I am changing cell's content using scope.formatAlarmState. In the second column I am just showing a value.
When I have first column only I see new content, but when I use both columns they both show values.
Not sure what I am doing wrong.

Thanks


Title: Re: Same data field for two columns in TreeGrid
Post by: jarry on July 03, 2015, 05:55:05 PM
The column fields must be unique in datagrid and treegrid.