Results 1 to 3 of 3

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

  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    118
    Vote Rating
    0
      0  

    Default [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
      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
      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

Posting Permissions

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