1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    69
    Vote Rating
    0
    paweluz is on a distinguished road

      0  

    Default Unanswered: How programmatically disable item (element) in list

    Unanswered: How programmatically disable item (element) in list


    Hi


    This is my first post in Sench Touch forum I am really familiar with ExtJS 3 but this ST stuff is really a mistery for me I got list with 6 elements in it. How can I programmatically disable one of them??


    I can access my list with:
    Code:
    Ext.ComponentQuery.query('#myList')[0]

    I have tried:
    Code:
    Ext.ComponentQuery.query('#myList')[0].items // only one element appears
    
    
    Ext.ComponentQuery.query('#myList')[0].getStore().getAt(2) // access to model, can not do disable on it!!!
    
    
    Ext.ComponentQuery.query('#myList')[0].getViewItems()[2] // access to element, can not do disable on it ass well
    
    
    Ext.ComponentQuery.query('#myList')[0].setDisabled(true) // does not do anything!!!!

    Hope anyone can help me with that....

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    69
    Vote Rating
    0
    paweluz is on a distinguished road

      0  

    Default


    Since no one gave me any idea I have decide to use this solution:


    Code:
    		var listItems = Ext.ComponentQuery.query('#myList')[0].getViewItems();
    		var button1= listItems[0];	
    		button1.style.opacity = '0.5';
    		button1.style.color = 'grey';
    Then in controller in itemtap listener:

    Code:
    if(....) // time you want the item to be disabled
    return false
    maybe someone will need it... If anyone came up with better solution, please let me know.

    cheers

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    48
    Answers
    4
    Vote Rating
    3
    shwetapande10 is on a distinguished road

      0  

    Default


    Hi,

    Hope this is not too late to answer your query.
    You could use Ext.XTemplate to dynamically apply the disabled CSS property
    And can handle itemtap listener to abort the request for a particular disabled item.

    Hope this solves your issue.

  4. #4
    Sencha User
    Join Date
    May 2010
    Posts
    69
    Vote Rating
    0
    paweluz is on a distinguished road

      0  

    Default


    You could use Ext.XTemplate to dynamically apply the disabled CSS property
    Hi. I do not think that it is possible. In firebug you can clearly see that those element are div, and not any functional HTML components like textfield or button. I think that CSS disable would not work for this...

    but thanks anyway!

Thread Participants: 1

Tags for this Thread

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