Hybrid View

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

      0  

    Default Answered: Modify contents in a List - How do we refresh a list after modifying the store?

    Answered: Modify contents in a List - How do we refresh a list after modifying the store?


    Hi,

    I am using a Sencha List as shown below:

    Ext.regModel ('List1', {idProperty: 'id',
    fields: [ { name: 'id', type: 'int' }, { name: 'title', type: 'string' }, ], });

    Ext.regStore('List1Store', { model:'List1', });

    MyApp.views.List1List = new Ext.List ({
    id: 'idList1', store: 'List1Store',
    itemTpl: '<div class="list-item-title" > <input type = "checkbox" id = "{id}" > {title} &nbsp; {narrative}</div>',
    });

    I am adding this list to a Panel and displaying it. My requirement is to add, delete and update items in this list. Adding and deleting (by List.getStore.add(), and List.getStore.remove() ) is working without any issues. But, we are not successful yet on updatign an existing content in the list. What is the best way to do this?
    How do I retrieve items from store, update a record in the store, and refresh the list with the updated item?
    we tried repaint() and load(), but it didnt work :-(
    please help....

    }

  2. normally you would use

    Code:
    grid.getView().refresh();
    after changing something.

  3. #2
    Sencha User
    Join Date
    Sep 2009
    Posts
    84
    Answers
    8
    Vote Rating
    -1
    raz0r1 is an unknown quantity at this point

      0  

    Default


    normally you would use

    Code:
    grid.getView().refresh();
    after changing something.

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

      0  

    Default List has getView?

    List has getView?


    Does List have a getView() function. I think, NOT.

  5. #4
    Sencha User
    Join Date
    Sep 2009
    Posts
    84
    Answers
    8
    Vote Rating
    -1
    raz0r1 is an unknown quantity at this point

      0  

    Default


    you posted in Ext 4 Q&A Forum.
    In Ext 4 grid == list (look at the docs. there is no Ext.List class).
    so either you posted in the wrong forum or you did not provide enough information.

    (further in this forum you get help from people who does this voluntarily so please dont be impolite. thanks.)

  6. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    15
    Answers
    1
    Vote Rating
    0
    vinodh_nair is on a distinguished road

      0  

    Default


    ya..i think, i posted in a wrong forum..

    By the way, i tried List.refresh(), and is found to be working...thanks...

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar