dojo datagrid row formatter / label function

前端之家收集整理的这篇文章主要介绍了dojo datagrid row formatter / label function前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_502_0@1. add a formatter function to each cell of datagrid's layout

@H_502_0@it will show a label like item.a + item.b after edit

formatter: function(item){
returnitem.a+ item.b;
}
@H_502_0@2. Sometimes you want to show a label based on two properties of an row data,you can add get function to each cell

@H_502_0@

@H_502_0@ get: function(rowIndex,item){

@H_502_0@ return item.a+ " " + item.b;

@H_502_0@

@H_502_0@ },

猜你在找的Dojo相关文章