1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    27
    Vote Rating
    0
    dissectcode is on a distinguished road

      0  

    Default How do I add a button to a grid action column ?

    How do I add a button to a grid action column ?


    Can someone please tell me how to add a button to a grid column. Here is what I have done so far :

    In Project Inspector > click on MyGridPanel > in Config panel: Columns (press '+' to add new) > new Action Column > Set the icon

    So the icon shows up in the column. Great, but I can't click on it. How do I make it a button? I tried asking this in the general forum but I don't understand the answer

    I need to delete the row of the grid where the icon is clicked. thanks


    http://www.sencha.com/forum/showthre...019#post891019

  2. #2
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    If you want to use a real Button, then you'll need to create a TemplateColumn, not an ActionColumn.

    Drag a TemplateColumn over, then add a tpl (template). In the tpl definition, add this:

    Code:
    <tpl for="."><input type="button" value="ButtonText" onclick="myButtonOnClickFunction({recordField});"/></tpl>
    Obviously you'll have to define some global myButtonOnClickFunction to handle the click event.

    Now, if you want to use the ActionColumn....notice when you drag that over to your GridPanel it should create an ActionColumnItem object as well. So in there you set the icon class (iconCls) of the rendered "button". I suppose you could create your own graphic that looks like a button. You have to then add a handler to that ActionColumnItem for anything to happen when you click on it.

    Hope this helps.

Thread Participants: 1

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