Example #1
0
        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);
            //


            //}
        }
Example #2
0
        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);
            //


            //}
        }