Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Anatomy of the Grid in 1.0 Alpha1

  1. #11
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    Sorry about that. Grab it again.

  2. #12
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      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
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

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

  4. #14
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

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

    Can't wait!

  5. #15
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      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 User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
      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 User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      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.

Page 2 of 2 FirstFirst 12

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

Posting Permissions

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