private void fillUpDataGridWithBookItems(DataGridView dataReport, string bookPurchase) { dataReport.Rows.Clear(); dataReport.Columns.Clear(); var column1 = new DataGridViewColumn(); column1.HeaderText = "Название книги"; column1.ReadOnly = true; column1.Name = "Name"; column1.CellTemplate = new DataGridViewTextBoxCell(); var column2 = new DataGridViewColumn(); column2.HeaderText = "Автор"; column2.Name = "Author"; column2.CellTemplate = new DataGridViewTextBoxCell(); var column3 = new DataGridViewColumn(); column3.HeaderText = "Цена"; column3.Name = "Price"; column3.CellTemplate = new DataGridViewTextBoxCell(); var column4 = new DataGridViewColumn(); column4.HeaderText = "Кол-во"; column4.Name = "Quantity"; column4.CellTemplate = new DataGridViewTextBoxCell(); dataReport.Columns.Add(column1); dataReport.Columns.Add(column2); dataReport.Columns.Add(column3); dataReport.Columns.Add(column4); workServerStore.completeBookReport(dataReport, bookPurchase); }