码迷,mamicode.com
首页 > Web开发 > 详细

ExtJs4.1中给列表的单元格设置颜色

时间:2016-05-16 11:05:08      阅读:438      评论:0      收藏:0      [点我收藏+]

标签:

 

如:

技术分享

 

代码:

 {
                                        xtype: ‘gridcolumn‘,
                                        dataIndex: ‘summary‘,
                                        text: ‘总评价‘,//‘改‘,
                                        width: 70,
                                        renderer: function(value, metaData, record) {
                                            var index = summaryStore.find(‘evalValue‘,value);
                                            if(index != -1) {
                                                var value = summaryStore.getAt(index).get(‘result‘);
                                            }
                                            return value;
                                       },
                                        stateId:‘qpniRgaProblemInQpni_012‘
                                    },
                                    {
                                        xtype: ‘gridcolumn‘,
                                        dataIndex: ‘askedDes‘,
                                        text: gridSummary.qpn.title16,//‘问题描述‘,
                                        width: 130,
                                        editor: {
                                            xtype: ‘textfield‘,
                                            maxLength:100
                                        },
                                        renderer: function(value, metaData, record,store) {
                                           //   me.onRgCellClick(value, metaData, record,store);
                                              
                                              var stage = record.get(‘rgaStage‘);
                                              var publishFlag = Ext.getCmp(‘stageBtn‘+stage);
                                              if(publishFlag.isDisabled()){
                                              }else{
                                                   metaData.style=‘background:#F0F0F0‘;
                                              }
                                              
                                              if(value != null && value.toString().length > 7) {
                                                metaData.tdAttr = ‘data-qtip="‘ + value + ‘"‘;
                                              }
                                            return value;
                                         },
                                         stateId:‘qpniRgaProblemInQpni_013‘
                                    }

 

ExtJs4.1中给列表的单元格设置颜色

标签:

原文地址:http://www.cnblogs.com/renpei/p/5497203.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!