From 8ba11562572a4b641a8ade741e017d1814eca7ee Mon Sep 17 00:00:00 2001 From: jhz <jinghz@oceic.com> Date: 星期四, 11 八月 2022 20:21:09 +0800 Subject: [PATCH] 列宽 --- WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs b/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs index 9268d94..f18ccfb 100644 --- a/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs @@ -63,6 +63,7 @@ public string ColumnName; public bool IsHide; public string Alignment; + public string ColumnWidth; } [Route("Xt_grdAlignment_WMES/AddgrdAlignmentWMES")] @@ -109,7 +110,10 @@ var HGridString = ""; for (int i = 0; i < omdelsub.Count; i++) { - HGridString += $"{(i+1)}|{(omdelsub[i].IsHide == true ? 1 : 0)}|{omdelsub[i].Alignment},"; + var width = omdelsub[i].ColumnWidth; + if (string.IsNullOrEmpty(width) || DBUtility.ClsPub.isLong(width) == 0) + width = "120"; + HGridString += $"{(i + 1)}|{(omdelsub[i].IsHide == true ? 1 : 0)}|{omdelsub[i].Alignment}|{width},"; } HGridString = HGridString.Substring(0, HGridString.Length - 1); -- Gitblit v1.9.1