private void initializeDataGrid() { dgvItems.Columns.Clear(); dgvItems.Refresh(); dgvItems.AutoGenerateColumns = false; dgvItems.DataSource = bsSelectedItems; dgvItems.Columns.Add(DGVHandler.CreateTextBox("inventoryCode", "Code", "inventoryCode", false)); dgvItems.Columns.Add(DGVHandler.CreateTextBox("inventoryName", "Name", "inventoryName", false)); dgvItems.Columns.Add(DGVHandler.CreateTextBox("price", "Price", "price", true)); dgvItems.Columns.Add(DGVHandler.CreateTextBox("quantity", "Quantity", "quantity", false)); dgvItems.Columns.Add(DGVHandler.CreateTextBox("total", "Total", "total", true)); dgvItems.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvItems.RowHeadersVisible = false; dgvItems.SelectionMode = DataGridViewSelectionMode.FullRowSelect; }
private void initializeDataGrid() { dgvCustomer.Columns.Clear(); dgvCustomer.Refresh(); dgvCustomer.AutoGenerateColumns = false; readInventory(); dgvCustomer.Columns.Add(DGVHandler.CreateTextBox("code", "Code", "code", false)); dgvCustomer.Columns.Add(DGVHandler.CreateTextBox("name", "Name", "name", false)); dgvCustomer.Columns.Add(DGVHandler.CreateTextBox("address1", "Address 1", "address1", false)); dgvCustomer.Columns.Add(DGVHandler.CreateTextBox("email", "Email", "email", false)); dgvCustomer.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvCustomer.RowHeadersVisible = false; dgvCustomer.SelectionMode = DataGridViewSelectionMode.FullRowSelect; bindingNavigator1.BindingSource = bsCustomers; bsCustomers.CurrentChanged += new System.EventHandler(bsCustomers_CurrentChanged); bsCustomers.DataSource = new PageOffsetList(totalRecords, pageSize); }
private void initializeDataGrid() { dgvInventory.Columns.Clear(); dgvInventory.Refresh(); dgvInventory.AutoGenerateColumns = false; readInventory(); dgvInventory.Columns.Add(DGVHandler.CreateTextBox("code", "Code", "code", false)); dgvInventory.Columns.Add(DGVHandler.CreateTextBox("name", "Name", "name", false)); dgvInventory.Columns.Add(DGVHandler.CreateTextBox("description", "Description", "description", false)); dgvInventory.Columns.Add(DGVHandler.CreateTextBox("price", "Price", "price", false)); dgvInventory.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvInventory.RowHeadersVisible = false; dgvInventory.SelectionMode = DataGridViewSelectionMode.FullRowSelect; bindingNavigator1.BindingSource = bsInventory; bsInventory.CurrentChanged += new System.EventHandler(bsInventory_CurrentChanged); bsInventory.DataSource = new PageOffsetList(totalRecords, pageSize); }