1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    132
    Vote Rating
    0
    ssdesign is on a distinguished road

      0  

    Default Edit List items

    Edit List items


    Hi,
    Is it possible to have 'Edit' button which can allow editing (removing) items from a list? (like the native List conponent in XCode.

    Any pointers on how to achieve this?

    I was thinking of using some kind of DOM manipulation to add DIV elements to list component and performing some actions but not sure if anyone has already done it.

  2. #2
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Code:
    {
            xtype: 'list',
            store: giftStore,
            tpl: '<tpl for="."><div class="gifts {cls}">'+
                    '<span class="listDelete deleteGifts">&nbsp;</span>'+
                    '<span class="listProduct listPayType">{giftNumber}</span>'+
                    '<span class="listDelete listPayAmount">{price}</span>'+
                 '</div></tpl>',
            itemSelector: 'div.gifts',
            singleSelect: true,
            cls:'productList',
            scroll:false,
            listeners: {
                "itemtap": function(dataview,index,element,evt) {
                    eventClassname = evt.target.className;
                    titleClassname = element.className;
                    if((eventClassname.search('deleteGifts')!= -1) &&(titleClassname.search('prodListHeader') == -1)) {
                        selectedRecord = dataview.store.getAt(index);
                        dataview.store.remove(selectedRecord);
                    }
                }
            }
        }
    This is how I got it done to remove rows from a list. I added a class call deletegifts to the delete button. So when the itemtap event occurs I can know where the user clicked. Well I guess the code will explain everything for u.

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    132
    Vote Rating
    0
    ssdesign is on a distinguished road

      0  

    Default


    cool, sounds interesting.
    I am going to try it later today.

  4. #4
    Ext User
    Join Date
    Jun 2010
    Posts
    13
    Vote Rating
    0
    Considerate is on a distinguished road

      0  

    Default


    ...
    Last edited by Considerate; 6 Aug 2010 at 6:50 PM. Reason: I thought I was watching another thread -.-

Similar Threads

  1. Combobox inner list not aligning list items propertly ?
    By ritesh.kapse in forum Ext 2.x: Help & Discussion
    Replies: 13
    Last Post: 29 Oct 2010, 5:29 AM
  2. Editable list items?
    By ssdesign in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 7 Jul 2010, 9:18 AM
  3. How to get list of items in accordion panel
    By Max Carey in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Jun 2008, 9:50 AM
  4. Form items list
    By yuiman in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 31 May 2008, 6:59 PM
  5. Get all list items?
    By doubleforte in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Oct 2007, 8:56 AM

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..."