Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# DataGridViewButtonCell set buttons text

I need to add my DataGridViewButtonCell to Column, and I need to name each other with different names.

But I didn't find any text properties.

Can anyone help me, please?

i do that stuff

DataGridViewButtonCell b = new DataGridViewButtonCell(); 
b.Value = "name"; 
MainTable.Rows.Add(b);

and it doesn't work

like image 768
animekun Avatar asked Oct 03 '13 12:10

animekun


1 Answers

If you want all the buttons to have same text use UseColumnTextForButtonValue property.

If you want different text for each button then use DataGridViewCell.Value property

like image 193
Sriram Sakthivel Avatar answered Oct 16 '22 19:10

Sriram Sakthivel