1
Answer

i want to add two button in single coulmn (column no: 21)

Hi,
I want to add two button in single coulmn (column no: 21) in datagridview without using datatable.Please help me.how to add 2 buttons in column no 21.
 
ChangeRep = new DataGridViewButtonColumn();
// ChangeRep.UseColumnTextForButtonValue = true;
ChangeRep.HeaderText = "";
ChangeRep.Width = 120;
ChangeRep.Name = "ChangeRep";
ChangeRep.Text = "Change Rep";
ChangeRep.HeaderText = "ChangeRep";
ChangeRep.FlatStyle = FlatStyle.Popup;
ChangeRep.DefaultCellStyle.BackColor = System.Drawing.Color.Navy;
ChangeRep.DefaultCellStyle.ForeColor = System.Drawing.Color.White;
ChangeRep.UseColumnTextForButtonValue = true;
//gv_CRWS_details.Columns.Insert(23, ChangeRep);
undo = new DataGridViewButtonColumn();
// ChangeRep.UseColumnTextForButtonValue = true;
undo.HeaderText = "";
undo.Width = 120;
undo.Name = "undo";
undo.Text = "Undo";
undo.HeaderText = "ChangeRep";
undo.FlatStyle = FlatStyle.Popup;
undo.DefaultCellStyle.BackColor = System.Drawing.Color.Navy;
undo.DefaultCellStyle.ForeColor = System.Drawing.Color.White;
undo.UseColumnTextForButtonValue = true;
ChangeRep.UseColumnTextForButtonValue = true;
//gv_CRWS_details.Columns.Insert(23, ChangeRep);
//gv_CRWS_details.Columns.Insert(23, undo
Answers (1)