Results 1 to 3 of 3

Thread: TreeGrid: getSelectedItem problem, always unmodified record

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
      0  

    Default TreeGrid: getSelectedItem problem, always unmodified record

    Hi All,

    I have a problem: after completeEdit event tree.getSelectionModel().getSelectedItem() always returns unmodifed record.

    PHP Code:
     editing.addCompleteEditHandler(new CompleteEditHandler<BaseProxy>(){        @Override        public void onCompleteEdit(CompleteEditEvent<BaseProxyevent) {            CountryProxy c =  (CountryProxy)tree.getSelectionModel().getSelectedItem();            System.out.println(c.getName());        }    }); 
    any help?
    ps: gxt = 3.0.1

  2. #2
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
      0  

    Default

    try this:

    store.setAutoCommit(false);

    PHP Code:
    editing.addCompleteEditHandler(new CompleteEditHandler<BaseProxy>(){
            @Override        public void onCompleteEdit(CompleteEditEvent<BaseProxy> event) {            CountryProxy c =  (CountryProxy)tree.getSelectionModel().getSelectedItem();            ValueProvider<? super BaseProxy, String> v = cc1.getValueProvider();            String s = tree.getStore().getRecord(c).getValue(v).toString();            System.out.println(c.getName() + " " + s);        }    });

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    Marking as closed based on discussion in IRC leading to this way of using Store and Record.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •