簡體   English   中英

如何在網格的列中添加extjs按鈕以顯示另一個窗口?

[英]How to add a extjs button in a column in the grid to show another window?

我有一欄包含搜索結果,但是單擊按鈕后我需要顯示一些添加到結果中的信息,但是我該怎么做呢? 我需要創建一個顯示按鈕,有人可以幫助我嗎?

韓國社交協會。 羅德里戈。

您可以為此使用操作列:

{
    xtype:'actioncolumn',
    width:50,
    items: [{
        icon: 'extjs-build/examples/shared/icons/fam/cog_edit.png',  // Use a URL in the icon config
        tooltip: 'Edit',
        handler: function(grid, rowIndex, colIndex) {
            var rec = grid.getStore().getAt(rowIndex);
            alert("Edit " + rec.get('firstname'));
        }
    },{
        icon: 'extjs-build/examples/restful/images/delete.png',
        tooltip: 'Delete',
        handler: function(grid, rowIndex, colIndex) {
            var rec = grid.getStore().getAt(rowIndex);
            alert("Terminate " + rec.get('firstname'));
        }
    }]
}

我認為您正在尋找的是ActionColumn(在Google順便說一下...上很難找到):

http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.grid.column.Action

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM