Results 1 to 6 of 6

Thread: Ext.grid.Panel?????????????????

  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    34
    Vote Rating
    0
      0  

    Default Ext.grid.Panel?????????????????

    ???????????????
    ????????????????

    Grid??????????????????????????????????

    ?????
    ??layout:'border' ?????????
    ??'north'????????????????????
    ??'center'?Ext.grid.Panel?????

    ??????
    ??????????????????Ajax??????????(??)
    ??????????Grid??????(????????????????)
    ?????????????????????Ajax??????????(???)
    ?? ????????Grid??????(?????????????)
    ?????????????? ???????????Ajax??????????
    ?? ????????Grid??????(???????????????Grid?????????)


    ????????Grid??????????????????
    ?????????????????????????????????????
    Grid???????????????

    (????????????????????????????Grid?????????????????????)


    ????????????????????????

    ????????????????????
    ?????????????
    Last edited by shobuno; 13 Feb 2012 at 6:16 PM. Reason: ??????????????

  2. #2
    Sencha User mashiki's Avatar
    Join Date
    Oct 2007
    Location
    Japan
    Posts
    139
    Vote Rating
    0
      0  

    Default

    ?????????????????
    ???????????????????????????????????

    A. ExtJS??????????????
    B. ???stable4.0.7????????
    C. ????????????????????????
    D. GridPanel?????2,4,6?store?????????????????????????
    E. IE?FireFox?Chrome?????????????
    E. ?????????????????????

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    34
    Vote Rating
    0
      0  

    Default

    ??????????????????????


    A. ExtJS??????????????
    ????Ver 4.0.7? ???


    B. ???stable4.0.7????????
    ????????????
    ????"stable"?????????????????????URL??DL???????
    ????http://www.sencha.com/products/extjs/download?page=a


    C. ????????????????????????
    ????????20????????????????????????????2?????????


    D. GridPanel?????2,4,6?store?????????????????????????
    ???
    ??????
    Code:
    Ext.define( 'CompareModel', {
            extend : 'Ext.data.Model',
            fields : [
                {name : 'ID',             type : 'string'},
                {name : 'No',             type : 'string'},
                {name : 'Name',           type : 'string'},
                {name : 'NameFlag',       type : 'int'},
                {name : 'NewFlag',        type : 'int'},
                {name : 'NonExistigFlag', type : 'int'},
                {name : 'RecursiveFlag',  type : 'int'}
            ]
        }
    );
    ??????
    Code:
    InfoStore = Ext.create('Ext.data.Store', {
        autoLoad: false,
        autoSync: false,
        model: 'CompareModel',
        proxy: {
            type: 'ajax',
            url : 'GetInfo.php',
            timeout : 10 * 1000,
            reader: {
                type: 'json',
                root: 'data'
            },
            actionMethods : {
                create: 'POST'
            },
            listeners : {
                exception : exceptionAlert
            }
        }
    });
    ??????
    Code:
    var myColumns001 = [
        {
            header : '?????',
            dataIndex : 'No',
            resizable : false,
            renderer : renderList,
            width : 40
        },
        {
            header : '?????',
            dataIndex : 'Name',
            resizable : false,
            renderer : renderList,
            width : 171
        },
        
    }
    ???????
    Code:
    grid001 = Ext.widget('grid', {
        store : InfoStore,
        columns : myColumns001,
        region : 'center',
        border : 0,
        width : 922
    });
    GetInfo.php??PHP???????(Oracle??????????)
    PHP Code:
    for($i 0$i $nrows$i++)
    {

        
    $data[$i] = array(
        
    'ID'             => $results['ID'][$i],
        
    'No'             => substr($results['No'][$i], -2),
        
    'Name'           => $results['Name'][$i],
        
    'NameFlag'       => $results['NameFlag'][$i],
        
    'NewFlag'        => $results['NewFlag'][$i],
        
    'NonExistigFlag' => $results['NonExistigFlag'][$i],
        
    'RecursiveFlag'  => $results['RecursiveFlag'][$i]
        );
    }

    $success true;

    echo 
    json_encode(
    array(
            
    "success" => $success,
            
    "results" => $nrows,
            
    "data"    => $data,
    )
    ); 

    E. IE?FireFox?Chrome?????????????
    ???IE8?FireFox10(9)?Chrome16?Opera11 ????????????????????


    F. ?????????????????????
    ??????????????????????????????
    ?????????????????????????????????????????
    ????????????????????



    ????????????Panel ?3??????????????GridPanel?????????
    ???????????????????????Panel??????????????????????????
    ??????????????????????????????????

    1. Ext.Viewport (layout : 'border')

    1.1. Ext.panel.Panel (layout : 'border', region : 'center')

    1.1.1 Ext.panel.Panel (layout : ????, region : 'north') ??????????????????????
    1.1.2 Ext.panel.Panel (layout : 'border', region : 'center') ???????????????????

    1.1.2.1 Ext.container.Container (layout: { type: 'table' }, region : 'north') ???????????3??????
    1.1.2.2 Ext.grid.Panel (layout : ????, region : 'center') ????


    ????????????????????????????????

  4. #4
    Sencha User mashiki's Avatar
    Join Date
    Oct 2007
    Location
    Japan
    Posts
    139
    Vote Rating
    0
      0  

    Default

    grid?width????????????????????????????
    ???????store??????????????????????load?????????????????

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    34
    Vote Rating
    0
      0  

    Default

    ????????load ?????????????
    ??????????????????up??????????

    ??????????????
    Code:
    createNorthPanel = function() {
        // ???????
        Ext.define( 'MonitoringModel', {
                    extend : 'Ext.data.Model',
                    fields : [
                        {name : 'CtrID',        type : 'auto'},
                        {name : 'CtrNm',        type : 'string'}
                        ]
                }
        );
        getMonitoringStore = Ext.create('Ext.data.Store', {
            autoLoad: true,
            autoSync: true,
            model: 'MonitoringModel',
            proxy: {
                type: 'rest',
                url : 'GetMonitoring.php',
                timeout : 10 * 1000,
                reader: {
                    type: 'json',
                    root: 'data'
                },
                writer: { type: 'json' },
                actionMethods : { create: 'POST' }
            }
        });
        cmb001 = new Ext.form.field.ComboBox({
            store        : getMonitoringStore,
            displayField : 'CtrNm',
            valueField   : 'CtrID',
            fieldLabel   : '?????',
            labelWidth   : 120,
            labelAlign   : 'right',
            queryMode    : 'local',
            editable     : false,
            listeners    : { select : cmb001Selected }
        });
    };
    cmb001Selected = function(combo, records, eOpts)
    {
        var params ={ID : records[0].data.ID };
        InfoStore.load({params : params});
    };

  6. #6
    Sencha User
    Join Date
    Mar 2010
    Posts
    34
    Vote Rating
    0
      0  

    Default

    ??????????????

    ??????Extjs4.0.7?????????????
    ?Ext JS 4.1 RC1?????????????????



    ????????????????
    Extjs4.0.7 ????????????????????????????


    ????????????
    ??Ajax?????????Grid??????(?????????????)
    ??Ajax?"??"?????????????(???????????)
    ???????????????????20??30????????
    ??Ajax???????Grid??????(???????????????Grid?????????)


    ??????????????????20??30???????????????????
    (10???????????????????????????????????????????)
    ()


    ?????????
    ??????Extjs???????????????
    Code:
    Ext.require('Ext.grid.Panel', function() {
        Ext.grid.Panel.override({
            initComponent : function() {
                var me = this;
    
                if (me.columnLines) {
                    me.setColumnLines(me.columnLines);
                }
    
                me.callParent();
    
                me.on('scrollershow', function(scroller) {
                    if (scroller && scroller.scrollEl) {
                        scroller.clearManagedListeners();
                        scroller.mon(scroller.scrollEl,
                                     'scroll',
                                     scroller.onElScroll,
                                     scroller);
                    }
                });
            }
        });
    });

    ???CR1?????????????????????????????????orz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •