注册氚云社区,学习低代码知识,与更多氚友互动交流
您需要 登录 才可以下载或查看,没有帐号?立即注册  
 
x
 
目前标准版不支持改变列表控件背景颜色,需要专业版,在列表设计的后端代码编辑器进行代码设置。示例如下- protected override void OnLoad(H3.SmartForm.LoadListViewResponse   response)
 
  
-     {
 
  
-           base.OnLoad(response);
 
  
-         if(this.Request.ListScene==H3.SmartForm.ListScene.NormalList){
 
  
-         string   isFormControl = this.Request["isFormControl"] == null ?   "" : this.Request["isFormControl"].ToString();
 
  
-         //设置只在load列表数据时加载颜色
 
  
-         if(isFormControl   != "1" && isFormControl != "true")
 
  
-         {
 
  
-               foreach(Dictionary < string, object > data in   response.ReturnData)
 
  
-             {
 
  
-                 //设置列名为Mobile的颜色为Red
 
  
-                   data["F0000002"] = new   H3.SmartForm.ListViewCustomCell(data["F0000002"] == null ?   "--" : data["F0000002"].ToString(),   H3.SmartForm.Color.Red);
 
  
-             }
 
  
-         }
 
  
-         }
 
  
-     }
 
  复制代码 
 
 
 
 
 
 |