示例#1
0
        private void LoadErrorListViewData()
        {
            errorListView.Clear();
            errorListView.View = View.Details;

            foreach (var item in _validateService.GetErrors(GetListViewStringListData(orderListView)))
            {
                errorListView.Items.Add(item.Errortext);
                orderListView.Items[item.RowIndex].BackColor = Color.IndianRed;
            }
            errorListView.Columns.Add("Errors:", 100);
            orderListView.Items[0].BackColor = Color.White;
            orderListView.Refresh();
            errorListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
        }