private void DesignMainGrid() { dgvMain.RowCount = 1; dgvMain.ColumnCount = 5; dgvMain.Columns[0].Name = "S.No"; dgvMain.Columns[0].Width = SNoWidth; dgvMain.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomLeft; dgvMain.Columns[1].Name = "Party ID"; dgvMain.Columns[1].Width = PartyIDWidth; dgvMain.Columns[2].Name = "Party Name"; dgvMain.Columns[2].Width = PartyNameWidth; dgvMain.Columns[3].Name = "Person Name"; dgvMain.Columns[3].Width = PersonNameWidth; dgvMain.Columns[4].Name = "Address"; dgvMain.Columns[4].Width = AddressWidth; dgvMain.RowHeadersVisible = false; dgvMain.AllowUserToDeleteRows = false; dgvMain.AllowUserToAddRows = false; dgvMain.AllowUserToResizeRows = false; dgvMain.AllowUserToResizeColumns = true; dgvMain.EditMode = DataGridViewEditMode.EditProgrammatically; dgvMain.ScrollBars = ScrollBars.Both; dgvMain.SelectionMode = DataGridViewSelectionMode.FullRowSelect; //GlobalFunction.SetGridStyle(dgvMain); GlobalFunction.AddActionButtonToGrid(dgvMain); // if (IsLookUpMode) { GlobalFunction.HideActionButtonFromGrid(dgvMain); } GlobalFunction.ApplyMasterGrid(dgvMain); // //} }
private void DesignSearchGrid() { dgvSearch.RowCount = 1; dgvSearch.ColumnCount = 9; dgvSearch.Columns[0].Name = "S.No"; dgvSearch.Columns[0].Width = SNoWidth; dgvSearch.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomLeft; dgvSearch.Columns[1].Name = "Party ID"; dgvSearch.Columns[1].Width = PartyIDWidth; dgvSearch.Columns[2].Name = "Party Name"; dgvSearch.Columns[2].Width = PartyNameWidth; dgvSearch.Columns[3].Name = "Person Name"; dgvSearch.Columns[3].Width = PersonNameWidth; dgvSearch.Columns[4].Name = "Address"; dgvSearch.Columns[4].Width = AddressWidth; dgvSearch.Columns[5].Name = "Contact"; dgvSearch.Columns[5].Width = ContactNoWidth; dgvSearch.Columns[6].Name = "Mobile"; dgvSearch.Columns[6].Width = MobileWidth; dgvSearch.Columns[7].Name = "Email"; dgvSearch.Columns[7].Width = EmailWidth; dgvSearch.Columns[8].Name = "Remarks"; dgvSearch.Columns[8].Width = RemarksWidth; dgvSearch.RowHeadersVisible = false; dgvSearch.AllowUserToDeleteRows = false; dgvSearch.AllowUserToAddRows = false; dgvSearch.AllowUserToResizeRows = false; dgvSearch.AllowUserToResizeColumns = true; dgvSearch.EditMode = DataGridViewEditMode.EditProgrammatically; dgvSearch.ScrollBars = ScrollBars.Both; dgvSearch.SelectionMode = DataGridViewSelectionMode.FullRowSelect; GlobalFunction.ApplyMasterGrid(dgvSearch); }
private void DesignMainGrid() { dgvMain.RowCount = 1; dgvMain.ColumnCount = 4; dgvMain.Columns[0].Name = "S.No"; dgvMain.Columns[0].Width = SNoWidth; dgvMain.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomLeft; dgvMain.Columns[1].Name = "Item ID"; dgvMain.Columns[1].Width = ItemIDWidth; dgvMain.Columns[2].Name = "Item Name"; dgvMain.Columns[2].Width = ItemNameWidth; dgvMain.Columns[3].Name = "Remarks"; dgvMain.Columns[3].Width = RemarksWidth; //323 dgvMain.RowHeadersVisible = false; dgvMain.AllowUserToDeleteRows = false; dgvMain.AllowUserToAddRows = false; dgvMain.AllowUserToResizeRows = false; dgvMain.AllowUserToResizeColumns = true; dgvMain.EditMode = DataGridViewEditMode.EditProgrammatically; dgvMain.ScrollBars = ScrollBars.Both; dgvMain.SelectionMode = DataGridViewSelectionMode.FullRowSelect; //GlobalFunction.SetGridStyle(dgvMain); GlobalFunction.AddActionButtonToGrid(dgvMain); GlobalFunction.ApplyMasterGrid(dgvMain); // //} }
private void DesignSelectedGrid() { dgvSelected.RowCount = 1; dgvSelected.ColumnCount = 4; dgvSelected.Columns[0].Name = "S.No"; dgvSelected.Columns[0].Width = SNoWidth; dgvSelected.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomLeft; dgvSelected.Columns[1].Name = "Item ID"; dgvSelected.Columns[1].Width = ItemIDWidth; dgvSelected.Columns[2].Name = "Item Name"; dgvSelected.Columns[2].Width = ItemNameWidth; dgvSelected.Columns[3].Name = "Remarks"; dgvSelected.Columns[3].Width = RemarksWidth; //323 dgvSelected.RowHeadersVisible = false; dgvSelected.AllowUserToDeleteRows = false; dgvSelected.AllowUserToAddRows = false; dgvSelected.AllowUserToResizeRows = false; dgvSelected.AllowUserToResizeColumns = true; dgvSelected.EditMode = DataGridViewEditMode.EditProgrammatically; dgvSelected.ScrollBars = ScrollBars.Both; dgvSelected.SelectionMode = DataGridViewSelectionMode.FullRowSelect; //GlobalFunction.SetGridStyle(dgvSearch); CheckBox chkSelected = new CheckBox(); chkSelected.Name = "Selected"; chkSelected.CheckedChanged += new EventHandler(chkSelected_CheckedChanged); GlobalFunction.AddCheckBoxToGrid(dgvSelected, chkSelected); //GlobalFunction.AddActionButtonToGrid(dgvSelected); GlobalFunction.ApplyMasterGrid(dgvSelected); }