<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
    • Approach 1
      • Use the array grid example in your packaged download array-grid.js
      • Add an extra column to the column model definition and a custom renderer.
    {header: "Controls", 

    width: 60,

    sortable: false,

    renderer: function() {

    return '<div class="controlBtn">

    <img src="../shared/icons/fam/cog_edit.png"

    width="16" height="16"

    class="control_edit">

    <img src="../shared/icons/fam/folder_go.png"

    width="16" height="16"

    class="control_go"></div>';

    },

    dataIndex: 'company'}
      • Then you would setup an event handler on the click event.
    grid.on('click', function(e) {

    var btn = e.getTarget('.controlBtn');

    if (btn) {

    var t = e.getTarget();

    var v = this.getView();

    var rowIdx = v.findRowIndex(t);

    var record = this.getStore().getAt(rowIdx);

    var control = t.className.split('_')[1];

    switch (control) {

    case 'edit':

    console.log('edit this record - ' + record.id);

    break;

    case 'go':

    console.log('go to this record - ' + record.id);

    break;

    }

    }

    }, grid);
      • Add the following CSS rule in array-grid.html to give some padding and change the cursor.
    <style>

    .controlBtn img {

    padding-left: 4px;

    cursor: pointer;

    }

    </style>
      • Using this same method you could add as many tools as you would like in the controls section and always give them the css class "controls_{toolname}". Ideally you would break this out into an XTemplate so that you could simply pass in whatever tools you would like to use and output them on the grid as well.

    • Approach 2 utilizes a plugin as discussed here  :
    http://rowactions.extjs.eu/
    posted on 2009-11-30 14:57 seal 閱讀(317) 評論(0)  編輯  收藏 所屬分類: EXTJS
    主站蜘蛛池模板: 国产亚洲精品一品区99热| 免费国产成人午夜电影| 亚洲人成在线电影| 国产猛男猛女超爽免费视频| 亚洲男人第一无码aⅴ网站| 色婷婷亚洲一区二区三区| 四虎在线播放免费永久视频| 亚洲AV网一区二区三区| 四虎免费永久在线播放| 一区二区三区免费在线观看| 亚洲黄片手机免费观看| 国产性生大片免费观看性| 亚洲视频一区调教| 国产h肉在线视频免费观看| 最新国产精品亚洲| 免费一级一片一毛片| 精品免费久久久久国产一区| 亚洲av无码精品网站| 国产成人免费爽爽爽视频| 国产精品亚洲五月天高清| 亚洲人成国产精品无码| 国内精品免费在线观看| 亚洲午夜国产精品| 国产成人免费高清在线观看| 久久国产乱子伦精品免费午夜 | 久久精品一本到99热免费| 亚洲一级免费视频| 又粗又黄又猛又爽大片免费 | 四虎影视无码永久免费| 亚洲黄色在线观看视频| 永久免费无码网站在线观看| 一级毛片aaaaaa视频免费看| 亚洲特级aaaaaa毛片| 成人毛片18女人毛片免费视频未 | 亚洲国产日韩在线观频| 久久综合九色综合97免费下载| 亚洲一区二区影视| 久久影院亚洲一区| 毛片基地免费视频a| 国产一级在线免费观看| 亚洲砖码砖专无区2023|