<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 評(píng)論 :: 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 閱讀(318) 評(píng)論(0)  編輯  收藏 所屬分類: EXTJS
    主站蜘蛛池模板: 亚洲av无码av在线播放| 亚洲国产午夜精品理论片 | 免费v片视频在线观看视频| 中文字幕亚洲情99在线| 永久免费av无码网站韩国毛片| 1区1区3区4区产品亚洲| 1000部羞羞禁止免费观看视频 | 99久久免费国产精精品| 亚洲成色WWW久久网站| 免费国产成人18在线观看| 亚洲国语精品自产拍在线观看| 人妻丰满熟妇无码区免费| 亚洲黄色免费电影| 无限动漫网在线观看免费| 无码天堂亚洲国产AV| 亚洲色偷偷狠狠综合网| 精品在线免费观看| 亚洲高清无在码在线无弹窗| 免费无码AV片在线观看软件| 久久亚洲精品11p| 亚洲综合色在线观看亚洲| 国产无遮挡无码视频免费软件| 久久精品国产亚洲AV无码偷窥| 无码永久免费AV网站| 狠狠入ady亚洲精品| 国产亚洲av片在线观看18女人 | 亚洲成年人免费网站| 性感美女视频在线观看免费精品 | 久久亚洲国产精品成人AV秋霞| 国产99视频精品免费观看7| 香蕉视频亚洲一级| 国产亚洲免费的视频看| 免费做爰猛烈吃奶摸视频在线观看 | 先锋影音资源片午夜在线观看视频免费播放 | 久久精品免费一区二区喷潮| 美女扒开尿口给男人爽免费视频| 国产V亚洲V天堂无码久久久| 丁香花在线观看免费观看| 一二三区免费视频| 亚洲国产成人精品无码区在线秒播 | 亚洲一区二区三区高清视频|