S
Saimvp
Hello and Gud Day.
I have a simple problem but I can't solve about the DataGridViewButtonColumn.
How can I show my Caption in DRV button.
Theres 2 way.
1. In the Design View. I set all the necessary needed like the "
UseColumnTextForButtonValue = true; "
2. Thru run time. Below is my sample code.
DataGridViewButtonColumn drv = new DataGridViewButtonColumn();
drv.HeaderText = "Sayre";
drv.UseColumnTextForButtonValue = true;
drv.DataPropertyName = "Sayre";
drv.DisplayIndex = 0;
drv.Text = "Sayre";
grid.Columns.Add(drv);
Result: None of these can show the caption "Sayre" in my Grid button.
Please help me.
Thanks.
I have a simple problem but I can't solve about the DataGridViewButtonColumn.
How can I show my Caption in DRV button.
Theres 2 way.
1. In the Design View. I set all the necessary needed like the "
UseColumnTextForButtonValue = true; "
2. Thru run time. Below is my sample code.
DataGridViewButtonColumn drv = new DataGridViewButtonColumn();
drv.HeaderText = "Sayre";
drv.UseColumnTextForButtonValue = true;
drv.DataPropertyName = "Sayre";
drv.DisplayIndex = 0;
drv.Text = "Sayre";
grid.Columns.Add(drv);
Result: None of these can show the caption "Sayre" in my Grid button.
Please help me.
Thanks.