Dynamically adding button to DataGrid C#

Dynamically add a button in DataGrid C # language easy
DataGridViewButtonColumn AddButton = new DataGridViewButtonColumn();
            AddButton.Name = "AddButton";
            AddButton.HeaderText = "AddButton";
            AddButton.Text = "AddButton";
            AddButton.Width = 70;
            AddButton.UseColumnTextForButtonValue = true;
            DataGrid.Columns.Add(AddButton);

Leave a Reply

Your email address will not be published. Required fields are marked *