`
fengchong719
  • 浏览: 80905 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Ext EditorGridPanel 添加一行.通用解决办法

    博客分类:
  • ext
EXT 
阅读更多
insertRows : function(){
    /*
      this = EditorGridPanel
      this.store.recordType() = Recrod类型
    */
    var recrod = new this.store.recordType();
    /*
     因为有的时候我们不是通过Ext.data.Record.create方法来构靠造这个Record的,
     而是通过Ext.Data.Reader 或者 Store 的 fields 来构造Record的,
     所以要用到下面的赋值代码
     */
    recrod.data = {};
    //获得Record的字段
    var keys = this.store.fields.keys;
    for(var i=0;i<keys.length;i++){
        recrod.data[keys[i]] = '';
    }
    //停止EditorGridPanel编辑
    this.stopEditing();
    //将Record数据添入Store中
    this.store.insert(0,recrod);
    //开EditorGridPanel编辑,光标在第1行第2列
    this.startEditing(0, 1);}
分享到:
评论
2 楼 fengchong719 2010-05-24  
ext 技术已经在逐渐普遍,以为他强大的组件库和已定义的样式,很是让人喜欢。
然而只有2.1版本之前的版本是免费的。
1 楼 wzglovejava 2010-05-21  
受教了,最近我也在自学Extjs只是会使用你注释中的那种,我发现在JE上有关Extjs的都不是很多,Extjs是不是很流行呢?我想知道的是,用这个技术的多吗?

相关推荐

    Ext可编辑的tree,EditorGridPanel

    因为项目的需求,实现一个可以编辑的tree,在网上找了一个牛人写的控件.Ext.ux.maximgb.tg.EditorGridPanel 把源码下载下来以后 不能运行,自己根据给出的列子,另写了一个小程序.不过并没有与数据库交互.

    可编辑表格Ext.grid.EditorGridPanel

    此文档是可编辑表格Ext.grid.EditorGridPanel的说明以及示例的源代码,放到eclipse里面即可运行,显示出效果!

    EXT核心API详解

    73、Ext.grid.EditorGridPanel类 ……… 62 74、Ext.grid.PropertyGrid类 …………… 65 1、Ext类 addBehaviors(Object obj) : void 对选择的元素 应用事件侦听器,事件名以@附加在结尾,例如 addBehaviors({ ...

    Ext 3.2的一个TreeGrid

    感谢 Ericzhen 远离颠倒梦想,蕴籍无上清凉 这里引用它的资源 仅作分享 http://www.cnblogs.com/Ericzhen/archive/2012/06/11/2545186.html

    ExtJS入门教程(超级详细)

    1、Ext类 ………………………………… 2 2、Array类 …………………………… 4 3、Number类 …………………………… 4 4、...73、Ext.grid.EditorGridPanel类 ……… 62 74、Ext.grid.PropertyGrid类 …………… 65

    Ext.grid.GridPanel右键菜单

    右键菜单的资料,代码已经详细描写。请仿照文件中所描述即可使用,不限于EXT4.0以上版本使用。

    给Extjs的GridPanel增加“合计”行

    NULL 博文链接:https://tonylian.iteye.com/blog/1735525

    ext 读取xml 可编辑grid

    ext 数据对象的定义 EditorGridPanel的使用 ext读取xml ext对各种数据格式的支持

    Extjs可编辑的EditorGridPanel

    NULL 博文链接:https://zxf-noimp.iteye.com/blog/629629

    解决editorgridpanel编辑时视图向右移动的问题

    NULL 博文链接:https://fourfire.iteye.com/blog/355853

    Extjs EditorGridPanel中ComboBox列的显示问题

    为了解决这个问题需要在EditorGridPanel的ColumnModel中显示ComboBox的地方使用renderer属性,重新渲染,方法如下: 代码如下: //部门列表 var comboxDepartmentStore = new Ext.data.Store({ proxy: new Ext.data....

    ExtJs2.0简明教程

    我这是根据别人写的做成PDF文档 第一章 开始ExtJS………………………………………………………………………………………………………4 1.1 获得ExtJS……………………………………………………………………...

    GridPanel属性详解

    详细介绍GridPanel各项属性,ExtJS 普通表格:Ext.grid.GridPanel属性详解

    ExtJS下grid的一些属性说明

    1.界面修改(css style): Extjs中界面风格与我们产品本身的风格有很大不同,从边框、选中行的颜色到鼠标移动到的行的颜色、菜单等,几乎都不同。Extjs对这些样式的设置都是由css完成的。如: 选中行的颜色就可用如下...

    extjs实例与学习资料

    因为前段时间有两个专案要用到extjs技术,所以自己学了一段...grid,tree,显示树信息的TreePanel、用于显示表格的GridPanel及EditorGridPanel,还有代表应用程序窗口的Ext.Window,与数据库交付,希望对初学者带来帮助

    extjsnaction

    1 A framework apart 2 Back to the basics 3 Events, Components, and Containers ...8 The EditorGridPanel 9 Taking root with Trees 10 Toolbars and Menus 11 Drag and drop with Widgets

    ExtJS 2.0实用简明教程

    6)Ext类库简介 7)Border区域布局 8)ExtJS的组件 9)Column列布局 10)组件的使用 11)Fit布局 12)Form布局 13)组件的配置属性 14)Accordion布局 15)事件处理 16)Card布局 17)Pable布局及其它布局 18)工具栏Toolbar 19)...

    EXTJS 学习笔片段1

    EditorGridPanel 使用本地store Toolbar工具菜单创建 分页工具栏创建 Window 弹出处理window窗口(模态窗口) MessageBox show(报错窗口、保存提示、选择窗口) alert prompt 实用工具类 JS异常捕捉 Ajax...

Global site tag (gtag.js) - Google Analytics