dojo datagrid row formatter / label function

1. add a formatter function to each cell of datagrid's layout

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

                                            formatter: function(item){
                                                return item.a + item.b;
                                            }
                               

2. Sometimes you want to show a label based on two properties of an row data, you can add get function to each cell

                                           get: function(rowIndex, item){

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

            

                                            },

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