程序员人生 网站导航

extjs5备忘(2)

栏目:互联网时间:2015-04-30 08:35:43

<!DOCTYPE html>

<html>

   <head>

         <metahttp-equiv="Content-Type" content="text/html;charset=UTF⑻">

        <title>Welcome to ExtJS!</title>

       <link rel="stylesheet"type="text/css"href="ext/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">

       <scripttype="text/javascript"src="ext/build/ext-all.js"></script>

       <scripttype="text/javascript"src="ext/trial/5.0.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>

 

        <script type="text/javascript" src="app.js"></script>

   </head>

   <body></body>

</html>

本博客所有内容是原创,如果转载请注明来源

http://blog.csdn.net/myhaspl/

app.js

Ext.application({

   name   : 'MyApp',

 

   launch : function() {

 

        Ext.widget({

            renderTo : Ext.getBody(),

            xtype    : 'grid',

            title    : '学生',

            width    : 650,

            height   : 300,

            plugins  : 'rowediting',

            store    : {

                fields : [ 'name', 'age','sex', 'score' ],

                data   : [

                    [ '张3', 35, '男', 98.5 ],

                    [ '李4', 29, '女', 68.4 ]

                ]

            },

            columns: {

                defaults: {

                    editor : 'numberfield',

                    width  : 120

                },

                items: [

                    { text: '名字',dataIndex: 'name', flex: 1, editor: 'textfield' },

                    { text: '年纪',dataIndex: 'age' },

                    { text: '性别',dataIndex: 'sex' , flex: 1, editor: 'textfield' },

                    { text: '成绩',dataIndex: 'score' }

                ]

            }

        })

   }

});

 


------分隔线----------------------------

上一篇 jdbc 自己理解

下一篇 EF之概念先行

------分隔线----------------------------

最新技术推荐