(1)label内容加粗
style添加font-weight = bold
(2)Autoform中所填内容清空
可以针对AutoForm的entity中的全部属性设置为空即可
formConditon.get("entity").set({
id:null,
name:null
});
(3)DataGrid中设置为多选(单选)
1)设置selectionMode,可选的有multiRows,singleRow,none
2)获得选择的行对应数据的信息(方法1)
var datas = dgProducts.get("selection");;
datas.each(function(entity){
dorado.MessageBox.alert(entity.get("id"));
});
3)获得选择的行的信息(方法2)var entity = dgProducts.getCurrentItem();
4)获得选中行的在表格中的一些信息(如行号等)
//获得整个行对应的Entity
var entity = dgProducts.getCurrentItem();
//因为是从0开始的,所以+1
var rowNum = dgProducts.get("itemModel").getItemIndex(entity)+1;
alert(rowNum);
其中ItemModel是为了获得指定Entity在表格中的信息的数据结构