[CLOSED] One to many grids

  1. #1

    [CLOSED] One to many grids

    I have a model that loads through a proxy to a grid. This model has a property List<Items> SubItems I would like to load these sub items in a separate grid bellow.
    I have tried with
    .Listeners(l => l.SelectionChange.Handler = "selected.length && #{subGrid}.bindStore(selected[0].SubItems);"),
    but this doesn't work. But something along those line I would like to have.
    Can you please help? Everything is loaded in the top grid store.
    Last edited by Daniil; May 13, 2015 at 8:22 AM. Reason: [CLOSED]
  2. #2
    Hi @registrator,

    At very least, you should replace
    selected[0].SubItems
    with
    selected[0].data.SubItems

    Though, you should ensure SubItems are really loaded to the Store.
  3. #3
    Hi Daniil

    It is still the same when I add .data
    The error seen in the browser is

    Uncaught TypeError: Cannot read property 'on' of undefinedaddManagedListener @ ext.axd?v=1895:18addManagedListener @ ext.axd?v=1895:18(anonymous function) @ ext.axd?v=1895:18Ext.cmd.derive.bindStore @ ext.axd?v=1895:18Ext.net.addTo.items.items.items.items.listeners.selectionchange.fn @ VM602:1fire @ ext.axd?v=1895:18Ext.util.DirectObservable.continueFireEvent @ ext.axd?v=1895:27(anonymous function) @ ext.axd?v=1895:18Ext.util.DirectObservable.fireEventArgs @ ext.axd?v=1895:25Ext.Component.fireEventArgs @ ext.axd?v=1895:56createRelayer @ ext.axd?v=1895:18fire @ ext.axd?v=1895:18Ext.util.DirectObservable.continueFireEvent @ ext.axd?v=1895:27(anonymous function) @ ext.axd?v=1895:18Ext.util.DirectObservable.fireEventArgs @ ext.axd?v=1895:25(anonymous function) @ ext.axd?v=1895:18Ext.util.DirectObservable.fireEvent @ ext.axd?v=1895:25(anonymous function) @ ext.axd?v=1895:18Ext.cmd.derive.maybeFireSelectionChange @ ext.axd?v=1895:18Ext.cmd.derive.doSingleSelect @ ext.axd?v=1895:18Ext.cmd.derive.doSelect @ ext.axd?v=1895:18Ext.cmd.derive.selectWithEvent @ ext.axd?v=1895:18Ext.cmd.derive.processSelection @ ext.axd?v=1895:18Ext.cmd.derive.onRowMouseDown @ ext.axd?v=1895:18fire @ ext.axd?v=1895:18Ext.util.DirectObservable.continueFireEvent @ ext.axd?v=1895:27(anonymous function) @ ext.axd?v=1895:18Ext.util.DirectObservable.fireEventArgs @ ext.axd?v=1895:25Ext.Component.fireEventArgs @ ext.axd?v=1895:56Ext.util.DirectObservable.fireEvent @ ext.axd?v=1895:25(anonymous function) @ ext.axd?v=1895:18Ext.cmd.derive.processUIEvent @ ext.axd?v=1895:18b.implement.callParent @ ext.axd?v=1895:18Ext.view.Table.override.processUIEvent @ ext.axd?v=1895:1460Ext.cmd.derive.handleEvent @ ext.axd?v=1895:18(anonymous function) @ VM585:5Ext.apply.createListenerWrap
  4. #4
    Please provide a test case.
  5. #5
    I will try to create a separate example in a separate project.

Similar Threads

  1. Error on Two Grids example
    By ivanp in forum 2.x Help
    Replies: 1
    Last Post: Nov 15, 2012, 9:11 AM
  2. Render 2 grids
    By LLdeOJ in forum 1.x Help
    Replies: 2
    Last Post: Jan 26, 2011, 9:06 AM
  3. Query about Two grids example
    By Nagaraj K Hebbar in forum 1.x Help
    Replies: 1
    Last Post: Oct 13, 2009, 3:35 AM
  4. Two Grids get value
    By JsonTerre in forum 1.x Help
    Replies: 0
    Last Post: Mar 09, 2009, 11:04 PM
  5. DnD Between 2 Grids
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 13, 2009, 2:02 AM

Posting Permissions