Home  >  Article  >  Java  >  How to dynamically modify gridPanel column header information and data in Extjs

How to dynamically modify gridPanel column header information and data in Extjs

巴扎黑
巴扎黑Original
2017-07-23 14:29:412375browse
           checkboxHistoryModule =              id : "alarmHistoryInfoCheck"             name : "alarmHistoryInfoCheck"                          boxLabel : "历史报警信息"                          handler:                                   (.checked==                      queryAlarmInfoHis_store = Ext.create('Ext.data.Store'                         autoLoad:                          pageSize: 50                         model: 'queryAlarmInfoHistoryData'                              type: 'ajax'                             url: 'queryAlarmInfo.do'                                  isShowHistory : "true"                                   type: 'json'                                 root: 'dataList'                                 totalProperty: 'total'                                        queryAlarmInfoHis_columns =                            [{ text: '序号', xtype:'rownumberer', width: 40                            { text: '拓扑图',  dataIndex: 'link',flex:1                                 text: '工作流ID'                                dataIndex: 'iflowid'                                flex:1                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                      text: '工程名称'                                dataIndex: 'prjName'                                flex:1                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                      text: '工作流名'                                dataIndex: 'flowName'                                flex:1                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                      text: '活动名'                                dataIndex: 'actName'                                flex:1                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                      text: '报警类型'                                dataIndex: 'type'                                width:80                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                      text: '报警描述'                                dataIndex: 'warnDes'                                flex:1                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                      text: '报警时间'                                dataIndex: 'warnTime'                                width:80                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                  { text: '处理描述',  dataIndex: 'delDes',width:80                                 text: '处理人'                                dataIndex: 'delUser'                                width:80                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                       text: '处理时间'                                dataIndex: 'delTime'                                width:80                                                                renderer :                                      metaData.tdAttr = 'data-qtip="' + value + '"'                                                                                                }                       queryAlarmInfoNotHis_store = Ext.create('Ext.data.Store'                           autoLoad:                            pageSize: 50                           model: 'queryAlarmInfoData'                                type: 'ajax'                               url: 'queryAlarmInfo.do'                                    isShowHistory : "false"                                     type: 'json'                                   root: 'dataList'                                   totalProperty: 'total'                                                queryAlarmInfoNotHis_columns =                              [{ text: '序号', xtype:'rownumberer', width: 40                              { text: '拓扑图',  dataIndex: 'link',flex:1                                   text: '工作流ID'                                  dataIndex: 'iflowid'                                  flex:1                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                          text: '工程名称'                                  dataIndex: 'prjName'                                  flex:1                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                          text: '工作流名'                                  dataIndex: 'flowName'                                  flex:1                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                          text: '活动名'                                  dataIndex: 'actName'                                  flex:1                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                          text: '报警类型'                                  dataIndex: 'type'                                  width:80                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                          text: '报警描述'                                  dataIndex: 'warnDes'                                  flex:1                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                          text: '报警时间'                                  dataIndex: 'warnTime'                                  width:80                                                                    renderer :                                        metaData.tdAttr = 'data-qtip="' + value + '"'                                                                     { text: '处理描述',  dataIndex: 'delDes',width:80                                   });

The above code snippet is a method of dynamically changing gridpanel column headers and displaying information according to needs. Personal summary. If reprinted, please indicate the source, thank you

The above is the detailed content of How to dynamically modify gridPanel column header information and data in Extjs. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn