Hybrid View

  1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    9
    Vote Rating
    0
    Gucky is on a distinguished road

      0  

    Default removeAt for selected row fails if filters are used

    removeAt for selected row fails if filters are used


    I have a gird that uses the features : [filters] (took the code from the samples). All is good, until I try to remove the selected record from the screen when a filter is active. The problem is that the current row within the store is e.g. 210 , whereby the filter may only display three entries and the second is the selected one, the call to store.removeAt( 210 ) will fail as its index is higher than the displayed entries. I would expect that Ext interanlly converts the 210 to the selected ( in this case 2 ) row. This is a problem in 4.1 and 4.1.1 RC2. Is this a bug, or is there a function that should be used to get the correct row to removeAt can be used with filters?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,001
    Vote Rating
    456
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    How would the store know that 210 is now 2?

    How did you get the value 210? You should grab the index each time you perform an action .. so by asking for the index, you should now get 2.

    You may want to look at removeAtKey where you can pass the key instead if a record index.

    Scott.

Thread Participants: 1