1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    arul_css is on a distinguished road

      0  

    Default Answered: Same records fetch problem

    Answered: Same records fetch problem


    Hi

    I have some records having same ids in data base , I am able to get those data as expected in JSON response , but in the grid it shows single record only.
    Code:
      {id:'company',header: "Id", width: 10, sortable: false, dataIndex: 'id'}
    Note : If records having different ids it works fine

    Please help

  2. the problem was not the id of the grid column. its the id field in your records. that must be unique. you said that your records do not have a unique id and when they do, then it works fine. you need to have one field which is unique to distinguish the records.

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,084
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      1  

    Default


    the id should be a unique value for each record. it doesnt necessarily have to be an integer but any field which can be used to distinguish the records. if your id fields are not unique, you can add another field with counter values (which would be unique then) as a workaround although i wouldnt recommend it.

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    arul_css is on a distinguished road

      0  

    Default


    Hi Farish

    I have removed id from this code, even then it is just fetching single record to the grid like before( but 2 records in json response)

    {id:'company',header: "Id", width: 10, sortable: false, dataIndex: 'id'}

    Note : id:company is of no use for my requirement

  5. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,084
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      1  

    Default


    the problem was not the id of the grid column. its the id field in your records. that must be unique. you said that your records do not have a unique id and when they do, then it works fine. you need to have one field which is unique to distinguish the records.

  6. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    8
    Vote Rating
    1
    svignesh is on a distinguished road

      1  

    Default store not allowing duplicate records

    store not allowing duplicate records


    Store will look for unique records by using its "internalId" property and I believe the store by default will map it's "internalId" to 'id' property . Try changing the fieldName "id" to some other value and check. it might work.

  7. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    arul_css is on a distinguished road

      0  

    Default


    Hi all

    After changing id value which is available duplicate value it is working

    Thanks

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi