View Full Version : Send associated Data to second Grid on the fly

31 Mar 2013, 5:16 AM
Hey Guys, iam new to ExtJS.

I got a grid with attributes and with some associated values, (just a bunch of strings....) so i also got two models and a two stores, for each entity.

After an itemclick on the first grid i want to display the associatedData (the attributevalues) in a second grid.

So i catch the item click event in my controller like this:

onAttribute: function (view, record)
var valueGrid =Ext.ComponentQuery.query('#valueGrid'[0],

data =record.getAssociatedData();



the reconfigure method dont work! i got a warning that a store is created with no model, but the both stores and models linked correctly! I really need some help, this issue cost me several hours :(

31 Mar 2013, 8:29 PM
According to the docs, getAssociatedData() returns and object and not a store, so you'll probably have to first put that data into a store and then pass it as a parameter to valueGrid.reconfigure().

See documentation: http://docs.sencha.com/ext-js/4-2/#!/api/Ext.data.Model-method-getAssociatedData