English 中文(简体)
EXTJS 利用其他电网中的电网数据
原标题:EXTJS using the data of a grid in an other grid
  • 时间:2010-08-25 17:51:53
  •  标签:
  • extjs

I want to use the data of my grid in an other grid when I create a window, I call a function and give it parameter, so I want that the grid in my window use this data

//In my main pag functionThatCreatesMyWindow(villeGrid.store.data);

//In my window myGrid.store.loadData(myParameter);

它没有工作:

问题回答

首先,你们需要理解OMD的工作范围。 如果该仓库是使用注册名称空间命名的,你可以在文件内从任何联合材料中查阅使用该名称空间的任何物体。 当你有多个窗口时,这些窗口将在两个不同的范围内运作。

在你的设想中,有一个能够帮助你消除的助手。

在一页上创建的每家仓库都自动在全球、静态、Ext.StoreMgr物体上登记。 如果这些仓库有存储信息(见Ext.data.Store的docs),你可以使用Static StoreMgr反对在你的窗口中提货。

//returns reference to store object from the StoreMgr 
var referenceToStore = Ext.StoreMgr.getKey( myStoreID );

如果这种工作不可行,就会形成一种工厂方法,由你把仓库转到能够消费该仓库的方法中。





相关问题
ExtJS load form items/fields from database

I am using ExtJS 3 here. I would like to populate a formpanel from database with fields to be submitted. Basically, I don t know witch fields my form will have and I want to generate all formpanel ...

How to use Ext JS for role based application

I am planning to use Ext JS for a large application. The application s features are role based. When user login, they only see menu and screen features related to them. My server side technology will ...

Dynamically adding a TabPanel to a Panel Region

I have a Panel layout with a TreePanel in one region. A user clicks on an node in the tree and a TabPanel should be displayed in another region with information, editing tools etc. for that tree node....

How to embed Json result within Extjs Panel?

I have some issues with Json result and embed it within the html of the Extjs Panel. Here s that I have managed to get so far. myPanel is embedded within a mainPanel, and I have some shows/hide of ...

Ajax data update. Extjs

I need to keep certain data ( in a grid) up to date and was gonna do a poll to the server every 15 seocnds or so to get the data and refresh the grid, however it feels a bit dirty ( the grid will have ...

Better way to call superclass method in ExtJS

All the ExtJS documentation and examples I have read suggest calling superclass methods like this: MyApp.MyPanel = Ext.extend(Ext.Panel, { initComponent: function() { // do something MyPanel ...

Merged Headers in Ext JS Grid

Is it possible to have two headers in Ext JS grids? I have to show my grid as grouped data.. for example product types and products. In my case I need a grid like this: Field | Product Type A ...

热门标签