EXT gridPanel 그림 추가

10550 단어 gridPanel
var workAreaGrid = new Ext.grid.GridPanel({

            region: 'west',

            title: ' ',

            store: wkSto,

            width: 500,

            split: true,

            margins: "0 3 0 0",

            stripeRows: true,

            autoExpandColumn: '4',

            //            loadMask: {

            //                msg: ' , ……'

            //            },

            columns: [new Ext.grid.RowNumberer(), {

                header: 'ID',

                hidden: true,

                width: 0,

                dataIndex: 'ID'

            },

            {

                header: 'intClassBJ',

                hidden: true,

                width: 0,

                dataIndex: 'BJ'

            },

            {

                header: 'intClassYJ',

                hidden: true,

                width: 0,

                dataIndex: 'YJ'

            },

            {

                header: ' ',

                width: 120,

                dataIndex: 'chrWorName'

            },

            {

                header: ' ',

                width: 100,

                dataIndex: 'date'

            },

            {

                header: ' ',

                width: 100,

                dataIndex: 'GX'

            },

            {

                header: ' ',

                width: 100,

                dataIndex: 'intClassBJ',

                renderer: function (record) {

                    var str;

                    switch (record.toString()) {

                        case "0": str = "<img src=\"SubSystem/WSFT_System/resources/Imgs/0.jpg\"/>";

                            break;

                        case "1": str = "<img src=\"SubSystem/WSFT_System/resources/Imgs/1.jpg\"/>";

                            break;

                        case "2": str = "<img src=\"SubSystem/WSFT_System/resources/Imgs/2.jpg\"/>";

                            break;

                    }

                    return str;

                }

            },

            {

                header: ' ',

                width: 100,

                dataIndex: 'intClassBJ',

                renderer: function (record) {

                    var str;

                    switch (record.toString()) {

                        case "0": str = "<img src=\"SubSystem/WSFT_System/resources/Imgs/0j.jpg\"/>";

                            break;

                        case "1": str = "<img src=\"SubSystem/WSFT_System/resources/Imgs/1j.jpg\"/>";

                            break;

                        case "2": str = "<img src=\"SubSystem/WSFT_System/resources/Imgs/2j.jpg\"/>";

                            break;

                    }

                    

                    return str;

                }

            }],

            listeners: {

                celldblclick: function (grid, rowIndex, record) {



                    //alert(record.toString());

                }

            }

        });

좋은 웹페이지 즐겨찾기