private void setData() { _bindingSource.DataSource = _dataTable.getData(); ((DataGridView)_item).DataSource = _bindingSource; int columnPosition = 0; string caption = ""; foreach (ValueTableColumn VTCol in _dataTable.Source.Columns) { caption = VTCol.Title == string.Empty ? VTCol.Name : VTCol.Title; ((DataGridView)_item).Columns[columnPosition++].HeaderText = caption; } }
private void setData() { _bindingSource.DataSource = _dataTable.getData(); ((DataGridView)_item).DataSource = _bindingSource; }