<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 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      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 閱讀(329) 評論(0)  編輯  收藏 所屬分類: EXTJS
    主站蜘蛛池模板: 免费观看的av毛片的网站| 日本精品久久久久久久久免费| 免费日本一区二区| 亚洲综合熟女久久久30p| xvideos永久免费入口| 亚洲精品国自产拍在线观看 | 亚洲春黄在线观看| 最近的中文字幕大全免费8| 老司机亚洲精品影院| av无码免费一区二区三区| 亚洲乱码一区av春药高潮| 日本妇人成熟免费中文字幕| 在线观看亚洲AV日韩AV| 在线观看免费精品国产| 九九免费精品视频在这里| 国产AV无码专区亚洲AV漫画| 久久精品私人影院免费看| 亚洲日韩乱码中文无码蜜桃臀| 毛片高清视频在线看免费观看| 色偷偷亚洲女人天堂观看欧| 国产又黄又爽又刺激的免费网址 | 久久国产乱子伦精品免费强| 亚洲熟妇无码久久精品| 成年私人影院免费视频网站| 国产亚洲成在线播放va| 亚洲精品无码专区在线在线播放| 午夜影院免费观看| 亚洲熟妇无码AV不卡在线播放| 亚洲AV无码之日韩精品| 国产麻豆一精品一AV一免费| 亚洲无mate20pro麻豆| 亚洲av无码成人精品区在线播放| 国产成年无码久久久免费| 亚洲精品天堂在线观看| 久久精品亚洲男人的天堂| 免费人成视频在线观看网站| 精品亚洲国产成人av| 亚洲av永久无码精品网站| 巨胸喷奶水视频www网免费| 久久国产福利免费| 亚洲综合国产成人丁香五月激情|