Rumah  >  Artikel  >  Java  >  Extjs如何动态修改gridPanel列头信息和数据的解决方法

Extjs如何动态修改gridPanel列头信息和数据的解决方法

巴扎黑
巴扎黑asal
2017-07-23 14:29:412416semak imbas
           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                                   });

以上代码片段是动态随需求改变gridpanel列头及显示信息的方法,个人总结,如转载,请注明出处,谢谢

Atas ialah kandungan terperinci Extjs如何动态修改gridPanel列头信息和数据的解决方法. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn