1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    81
    Answers
    3
    Vote Rating
    0
    mice-pace is on a distinguished road

      0  

    Default Answered: How to get Record by internalId?

    Answered: How to get Record by internalId?


    If i have the internalId from a record (that came from a regular store, being displayed by a grid), can i use that to later retrieve the original record? I can't find anything about this on google, and the getById method on the store seems to use a different id

  2. you can use stores data property via getByKey method because data property is a mixedcollection which is hashed by internalId of records


    Code:
    yourGrid.getStore().data.getByKey(yourRowsInternalId)

  3. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    Ankara
    Posts
    13
    Answers
    1
    Vote Rating
    0
    acteon is on a distinguished road

      0  

    Default


    you can use stores data property via getByKey method because data property is a mixedcollection which is hashed by internalId of records


    Code:
    yourGrid.getStore().data.getByKey(yourRowsInternalId)
    Last edited by acteon; 7 May 2013 at 11:35 PM. Reason: grammar and detailed explanation

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    81
    Answers
    3
    Vote Rating
    0
    mice-pace is on a distinguished road

      0  

    Default


    Ahh... I couldn't find a suitable method because i was only looking at the store, not the MixedCollection available from it...

    Perfect, thanks Acteon!

Thread Participants: 1

Tags for this Thread