1、How to get selected Rows from a Grid panel in ExtJs 4
get reference to grid selection model could be rowModel or cellModel depending on what was defined in the grid definition selType: 'cellmodel' or selType: 'rowmodel'
seletionModel = grid.getSelectionModel()
get array of the currently selected records
selectedRecords = selectionModel.getSelection()
get the value of given field definition from the first selected row
myValue = selectedRecords[0].get('fieldName')
loop thru selectedRecords for more records if MULTI selection was allowed
2、How to get selected Cells from a Grid panel in ExtJs 4
To get selected cell you must used selType = cellModel. After you get reference to the selectionModel as defined above use
getCurrentPosition( )
Returns the current position in the format {row: row, column: column}
After you have the current row and column get the grid view to access the cell
cell = grid.getView().getCellByPosition({row: obj.rowIdx, column: obj.colIdx});
分享到:
相关推荐
基于Extjs4官方的例子,做了一个关于MVC和Grid增删改的小例子
ExtJS grid过滤操作,可以动态操作本地的store更改筛选的内容
Extjs4下拉菜单中用Grid显示,有单选,和多选两个控件,完美通用代码控件,绝对让你好用,值得收藏^-^
EXTJS4 GRID 表格 分页 编辑 添加判断 颜色判断 分组 等示例
Extjs4 grid 导出为Excel 下载后放在网站(不放在网站中导出按钮不能会点击无响应,因为这里调用了swf文件)里可直接运行index.html测试 <link href='...
ExtJS4官方指南翻译:DragandDrop拖放/Grid组件/Tree组件/容器与布局
extjs4 ComboBox 点击下拉框 出现grid效果 这里只实现了点击下拉框显示gird,点击其他地方grid自动消失
extjs4 grid 包括form js代码
Extjs4前台前台grid导出excel
基于extjs form表单的项目源码
extjs4打印grid插件,官网上的一个例子程序,有需要的人可以下载来看看。
类似extjs中viewport的panel viewport只能渲染到body,而这个panel可以渲染到任何html元素,并且这个panel会自动变大!自动填充到最大化
Ext各种组件的使用实例,Extjs tree+grid+form+panel 使用实例
extjs grid示例代码extjs grid示例代码extjs grid示例代码extjs grid示例代码
这是利用sencha cmd 生成的GridFilterDemo工程中的app和build文件夹,其余文件过大并且与主题无关,因此未包含。具体方法,请参看我的博客: 《Extjs4.2 Grid Filter Feature 表格过滤特性》
ExtJS4学习笔记(九)---ExtJS4 EditGrid(可编辑的Grid) ExtJS4学习笔记(二)---HBox的使用 ExtJS4学习笔记(五)---Grid分页 ExtJS4学习笔记(八)---Grid多选 全选 ExtJS4学习笔记(六)---多表头Grid ExtJS4学习笔记(十)--...
Extjs 4.11 重写 Panel 添加 click事件
js代码,实现了 extjs4.x tabpanel 动态加载panel和html的功能
Extjs动态Grid的生成 htm
Extjs4的textfield控件竟然没有tooltip悬浮提示,这应该算是个bug吧。网上查了很多,也没有方案。后来自己通过查询并整理出这个方案,终于实现了。 思想如下: 在textfield渲染时注册mouseover事件,然后在其中调用...