namespace HStation.WinFrmUI { public partial class XhsProjectSimulationCalcuFailedCtrl : DevExpress.XtraEditors.XtraUserControl { public XhsProjectSimulationCalcuFailedCtrl() { InitializeComponent(); this.gridView1.SetNormalView(30); this.gridView1.RegistCustomDrawRowIndicator(40); } private List _allBindingList = null; /// /// 绑定数据 /// public void SetBindingData(List allFailedList) { _allBindingList = new List(); if (allFailedList != null && allFailedList.Count > 0) { foreach (var failed in allFailedList) { var vm = new XhsProjectSimulationCalcuFailedViewModel(failed); _allBindingList.Add(vm); } } this.xhsProjectSimulationCalcuFailedViewModelBindingSource.DataSource = _allBindingList; this.xhsProjectSimulationCalcuFailedViewModelBindingSource.ResetBindings(false); } } }