1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    118
    Vote Rating
    0
    Kutu is on a distinguished road

      0  

    Default [NO CODE] Grid getSelectionModel.getSelectedItem() not updated properly

    [NO CODE] Grid getSelectionModel.getSelectedItem() not updated properly


    Do the following steps:

    0) Prepare ListStore and Grid
    1) call grid.getSelectionModel().getSelectedItem()
    2) modify the model from the ListStore
    3) repeat step 1
    4) model is not updated from getSelectedItem()

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Please review these guidelines and post again. You should always include the version of Ext GWT you are using. And whenever possible, include some simple test code that illustrates the problem you are seeing.

  3. #3
    Ext User
    Join Date
    Sep 2008
    Location
    Kyiv, Ukraine
    Posts
    8
    Vote Rating
    0
    fes is on a distinguished road

      0  

    Default


    ver 1.2.3
    Code:
    	ColumnModel cm = new ColumnModel(new ArrayList<ColumnConfig>()); 
    		ListStore<BaseModel> store = new ListStore<BaseModel>();
    		EditorGrid<BaseModel> grid = new EditorGrid<BaseModel>(store, cm);
    		
    		BaseModel model = new BaseModel();
    		model.set("name", "test0");
    		
    		grid.getStore().add(model);
    		grid.getSelectionModel().select(0);
    		
    		model.set("name", "test1");
    		grid.getStore().update(model);
    		BaseModel model0 = grid.getSelectionModel().getSelectedItem();
    		assertEquals(model.get("name"), model0.get("name"));
    Last edited by fes; 17 Mar 2009 at 10:52 PM. Reason: forgot version

Thread Participants: 2