From 94b872a684fa6c065b22d1cf7088243a0900353b Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 19 三月 2025 08:26:17 +0800
Subject: [PATCH] 异常

---
 DevApp/Gs.DevApp/UserControl/SelectItemTbl.cs |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/SelectItemTbl.cs b/DevApp/Gs.DevApp/UserControl/SelectItemTbl.cs
index f28e7ef..1b1dab5 100644
--- a/DevApp/Gs.DevApp/UserControl/SelectItemTbl.cs
+++ b/DevApp/Gs.DevApp/UserControl/SelectItemTbl.cs
@@ -24,7 +24,7 @@
             InitializeComponent();
             this.daaGuid = _daaGuid;
             pageBar1.PagerEvent += PageBar1_PagerEvent;
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(this.GetType().FullName, gridView1, null, null, null, "", (value) =>
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, null, null, null, "", (value) =>
             {
 
             });
@@ -32,15 +32,12 @@
             btnIn.Click += (s, e) =>
             {
                 var list = new List<string>();
-                for (var i = 0; i < gridView1.DataRowCount; i++)
+                int[] rows = this.gridView1.GetSelectedRows();//鍏堣幏鍙栭�夋嫨琛岀殑琛屽彿
+                DataTable dt = this.gcMain.DataSource as DataTable;//寰楀埌GridControl鐨勬暟鎹簮
+                foreach (int idx in rows)
                 {
-                    var checkBox = gridView1.GetRowCellDisplayText(i, "gvChk");
-                    if (checkBox == "Checked")
-                    {
-                        var _guid = gridView1.GetRowCellValue(i, "dabGuid")
-                            .ToString();
-                        list.Add(_guid);
-                    }
+                    string _guid = dt.Rows[idx]["dabGuid"].ToString();
+                    list.Add(_guid);
                 }
                 UpdateParent?.Invoke(this,
                     new UpdateParentEventArgs { StringList = list });

--
Gitblit v1.9.3