sencha grid templatecolumn模板列和actioncolumn

templatecolumn列:


{
                                    xtype: 'templatecolumn',
                                    tpl: [
                                        '<a  style="color:blue;cursor:pointer"  onClick="window.open(\'/TestClass.ashx?method=GetRecordRemark&Id={Id}\')">查看備註</a>'
                                    ],
                                    text: '查看備註'
}





actioncolumn:

{
                                    xtype: 'actioncolumn',
                                    dataIndex: 'WordPath',
                                    menuText: '下載',
                                    text: '下載word',
                                    items: [
                                        {
                                            handler: function(view, rowIndex, colIndex, item, e, record, row) {
                                                //alert('download word:'+record.data.WordPath);
                                                window.open("/DataService/"+record.data.WordPath);
                                            },
                                            text: '下載',
                                            altText: '下載',
                                            icon: 'imgs/kan.png'
                                        }
                                    ]
   }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章