移动列表行格式
行格式化可以设置指定行、指定控件的属性(如:字体颜色、背景色、背景图片、可见性、高、宽等),具体支持哪些属性的设置,请查看MobileFormatCondition类。
1、移动单据列表行格式
[Description("销售业务圈改变单据状态颜色插件")] public class TestSaleBusiness:AbstractMobileListPlugin { public override void OnFormatRowConditions(Core.List.PlugIn.Args.ListFormatConditionArgs args) { base.OnFormatRowConditions(args); DynamicObject obj = ((DynamicObjectDataRow)args.DataRow).DynamicObject; if (obj["FDOCUMENTSTATUS"].ToString() == "C") { //设置单据状态颜色,以及布局背景图片 args.FormatConditions.Add(new MobileFormatCondition() { Key = "FMobileBillStatus", ForeColor = "255,255,0,0" }); args.FormatConditions.Add(new MobileFormatCondition() { Key = "FFlowLayout111", ImageKey = "YesBtn.webp" }); } else { //设置单据状态颜色,以及布局背景图片 args.FormatConditions.Add(new MobileFormatCondition() { Key = "FMobileBillStatus", ForeColor = "255,32,167,0" }); args.FormatConditions.Add(new MobileFormatCondition() { Key = "FFlowLayout111", ImageKey = "NoBtn.webp" }); } } }
2、移动单据体(移动列表)行格式化
[System.ComponentModel.Description("查看影像操作列表-表单插件")] public class ASCImageOperationEdit : AbstractMobilePlugin { public override void AfterBindData(EventArgs e) { base.AfterBindData(e); var ascImageDict = this.View.ParentFormView.Session["ASCImageDict"] as Dictionary; if (!ascImageDict.IsEmpty()) { List formatCondition = new List(); for (int i = 0; i < ascImageDict.Count; i++) { int rowIndex = this.Model.GetEntryRowCount("FMobileListViewEntity"); this.Model.CreateNewEntryRow("FMobileListViewEntity"); formatCondition.Add(new MobileFormatCondition() {Key = "FViewImage",Value = ascImageDict.Values.ElementAt(i).Get("Name").ToString(),Row = rowIndex + 1 }); if (i % 2 == 0) { formatCondition.Add(new MobileFormatCondition() { Key = "FStatus", ForeColor = "255,81,186,255", Row = rowIndex + 1 }); } else { formatCondition.Add(new MobileFormatCondition() { Key = "FStatus", ForeColor = "255,32,167,0", Row = i + 1 }); } } this.View.GetControl<MobileListViewControl>("FMobileListViewEntity").setFormat(formatCondition ); this.View.UpdateView("FMobileListViewEntity"); } } }
注:MobileFormatCondition的Editable属性可以设置字段是否可编辑,Visible、Disabled设置控件的可见性和锁定性。
移动列表行格式
行格式化可以设置指定行、指定控件的属性(如:字体颜色、背景色、背景图片、可见性、高、宽等),具体支持哪些属性的设置,请查看MobileFo...
点击下载文档
上一篇:列表与单据体多选模式下一篇:如何切换当前组织
本文2024-09-23 04:07:38发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-163303.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章