1. #11
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    6
    jack.slocum is on a distinguished road

      0  

    Default


    Sorry about that. Grab it again.

  2. #12
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,189
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Awesome! works :-)

    Seem to have a display problem with a double button with all my buttons, (there is an inner button in all the buttons). Not anything thats going to stop development though.

    Anyone have any suggestions/experiences with the new data marshalling/modified/dirty aspect of the grid?

  3. #13
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    6
    jack.slocum is on a distinguished road

      0  

    Default


    It's in there to define the interface. Look for auto marshalling of changes in a future release.

  4. #14
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,189
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Just teasing us to show what's to come eh?

    Can't wait!

  5. #15
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,189
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Jack:

    In response to why I need the index... or perhaps I'm overlooking something.

    When deleting a Record:
    Code:
    deleteTest : function() {
    	var deleteRow = sm.getSelected();
    	ds.remove(deleteRow);				
    	sm.selectPrevious();
    	// TODO if deleteRow was 0 how do we know to selectFirstRow
    },
    How do I know to call selectFirstRow if the user had clicked the first row?

  6. #16
    Sencha - Community Support Team
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    1
    tryanDLS is on a distinguished road

      0  

    Default


    Can you do that by looking at the index of the deleteRow? (untested)
    Code:
    if (ds.indexOf(deleteRow)) == 0) {
      sm.selectFirstRow();
    }

  7. #17
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,189
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Thanks Tim!

    Code:
    Code:
    var deleteRow = sm.getSelected();
    var deleteRowIdx = ds.indexOf(deleteRow);
    ds.remove(deleteRow);				
    if (deleteRowIdx === 0)
    	sm.selectFirstRow();
    else
    	sm.selectPrevious();
    Readers should note that the index has to be looked up before you delete it. Otherwise you will get -1 as it's already been deleted.

Similar Threads

  1. From Alpha1 to Alpha2
    By franklt69 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 24 Feb 2007, 9:47 PM