Rumah > Java > javaTutorial > teks badan

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

巴扎黑
Lepaskan: 2017-07-23 14:29:41
asal
2432 orang telah melayarinya
           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                                   });
Salin selepas log masuk

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

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

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
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
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan