To add button in DataGridView we have write the following code.

DataGridViewButtonColumn btnDGV= new DataGridViewButtonColumn();
//creating object of datagridview button.           
      btnDGV.Name = "Click";
//setting name of button to click
btnDGV.HeaderText = "Click";
//setting column title to click
      btnDGV.Text = "Click";
//setting button text to click
      btnDGV.UseColumnTextForButtonValue = true;
//this will enable button to show text


Now adding button to DataGridView



  Modified On Nov-30-2017 12:23:12 AM
  1. I am really grateful to you for sharing such valuable post.

Leave Comment