1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    8
    Vote Rating
    0
    jerome1985 is on a distinguished road

      0  

    Default how to add buttons in the grid of row

    how to add buttons in the grid of row


    hello
    when i use a grid ,I want to add some buttons in the end of row,such as add,delete.
    but i find It difficult to do this ,how can fix it
    thanks

  2. #2
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default


    why you don't set the buttons at the topcomponent?

  3. #3
    Ext User
    Join Date
    Dec 2008
    Posts
    34
    Vote Rating
    0
    Noggy is on a distinguished road

      0  

    Default


    Struggle with that for some time. If you really want widgets in a Grid...you should use table instead.

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    For general information. It is always bad to have all the widget for each row. This blows up dom and makes the browser slower as needed. You should really overthink your application design if you need this.

  5. #5
    Ext User
    Join Date
    Mar 2009
    Posts
    3
    Vote Rating
    1
    cevarief is on a distinguished road

      0  

    Lightbulb


    You could use renderer to add button to the cell of the end of row. This might be not the best solution but i use it. The bad thing is i don't use unobtrusive js for the onClick part.
    Here's my code to add link to cell. With a little modification, you could change the link to button.

    Code:
    {header: 'Nama', width: 130, dataIndex: 'nama', sortable: true,
       renderer: function(val,p,rec){
        return "<a href='#' onClick=\"show_alert('" + rec.data.id + "')\">" + val + '</a>';
    }}
    As the previous reply above suggest, you'd better consider using tbar or bbar and add button to achieve your goal for deleting or editing row. Get the row data id and do something from single button.

    Hope it helps.

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