duheng
2025-01-09 a91c47d4ae8ad414e492a66f10eafce678892503
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs
@@ -41,19 +41,17 @@
                _selected = item;
            }
            Search();
            await Task.Delay(300);
            if (_selected != null)
            {
                if (_allBindingList != null && _allBindingList.Count > 0)
                {
                    await Task.Run(() =>
                     {
                         var dataSourceIndex = _allBindingList.FindIndex(x => x.Vmo == _selected);
                         if (dataSourceIndex >= 0)
                         {
                             var rowIndex = this.gridView1.GetRowHandle(dataSourceIndex);
                             this.gridView1.FocusedRowHandle = rowIndex;
                         }
                     });
                    var dataSourceIndex = _allBindingList.FindIndex(x => x.Vmo == _selected);
                    if (dataSourceIndex >= 0)
                    {
                        var rowIndex = this.gridView1.GetRowHandle(dataSourceIndex);
                        this.gridView1.FocusedRowHandle = rowIndex;
                    }
                }
            }
        }
@@ -88,6 +86,5 @@
            }
            return vm.Vmo;
        }
    }
}
}