2024年8月18日 星期日

V80202G- 切換資料 – grid.on(“selectionchanged”,function(){} ) – [備註]欄位排版 - 下方填滿

 目的: V80202G- 版別修改記錄查詢 – grid.on(“selectionchanged”,function(){}  ) – 顯示備註欄位值

處理說明:   1>Grid 資料切換時,
                         Ext.getCmp('sub_Grid').on("selectionchange", function (view, selections, options) {
                    2> [備註]欄位排版  - 下方佔滿
 {
                        xtype: 'panel', id: 'sub_panel3', region: 'south', layout: 'fit',
                        height: 60,
                        items: [
                            {
                                xtype: 'panel', id: 'sub_panel31', layout: { type: 'fit' },  border: 0,
                                items: [cmp_sub_REPLRMK],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,

                    },  // end of sub_panel1        
}



1>*.js

  1>>切換資料
  Ext.getCmp('sub_Grid').on("selectionchange", function (view, selections, options) {
        //var cur_recs = mysubstore.getSelectionModel().getSelection();
        var cur_recs=Ext.getCmp('sub_Grid').getSelectionModel().getSelection();
        if (cur_recs.length == 0)
            return;
        var cur_rec = cur_recs[0];
        var Tmp_REPLRMK = nulltoStr(cur_rec.data['REPLRMK']).toString();        
        Ext.getCmp("sub_REPLRMK").setValue(Tmp_REPLRMK);
    }
    );

2> [備註]欄位排版  - 下方佔滿
 var sub_V80202G_Flds = [
            {
                type: 'panel', bodyStyle: "background-color:transparent;", border: 5, padding: "1",
                layout: 'border',
                items: [
                    {
                        xtype: 'panel', id: 'sub_panel1', region: 'north', layout: 'hbox',
                        height: 30,
                        items: [
                            {
                                xtype: 'panel', id: 'sub_panel11', layout: { type: 'hbox', align: 'stretch' }, flex: 25, border: 0,
                                items: [cmp_sub_AMMNO, cmp_sub_SAPNO, cmp_sub_PN,],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,
                    },  // end of sub_panel1                        
                    {
                        xtype: 'panel',
                        id: 'sub_panel2',
                        region: 'center',
                        layout: 'fit',
                        //flex: 5,
                        border: 1,
                        items: [sub_Grid]
                    },
                    {
                        xtype: 'panel', id: 'sub_panel3', region: 'south', layout: 'fit',
                        height: 60,
                        items: [
                            {
                                xtype: 'panel', id: 'sub_panel31', layout: { type: 'fit' },  border: 0,
                                items: [cmp_sub_REPLRMK],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,
                    },  // end of sub_panel1        
                ] // end of   layout: "vbox", padding: "5", items: [
            }  //end of  sub_ShowPN_Flds , items[{
        ]      //end of  var sub_ShowPN_Flds           

沒有留言:

張貼留言