Results 1 to 2 of 2

Thread: Ext.grid.GridPanel fires rowselection when sorting grid

  1. #1

    Question Ext.grid.GridPanel fires rowselection when sorting grid

    Hi All,
    First time caller, long time listener here.

    I have a grid which fires a function to add a tab via row selection. The code is adapted from the examples supplied when downloading ext. I have the following function which creates a new tab

    Code:
    		
    function addTab(){
    	var strTitle = 'Ticket';		
            tabs.add({
                    title: strTitle,
                	html: 'Blah',
                	closable:true
            	}).show();
    }
    I call this via;
    Code:
    	grid.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
    		addTab();
    	});
    This works fine however what happens is that after I make a selection which creates a new tab, attempting to sort the grid (via the default sort options) fires grid.getSelectionModel again thereby rendering the sorting functionality useless. This only happens after I have selected a row. The grid will sort ok before I select a row.

    I am fairly inexperienced with ext so any help would be appreciated.

    My grid is using a GroupingStore but the same thing happens with a normal store.

    Regards,
    Cameron

  2. #2

    Default

    Please ignore. I'm using 2.1 so I will re-post to the correct forum.

Posting Permissions

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