I would like to change the text of the autogenerated "select"
column in an ASP.NET GridView
control. The text needs to be changed to the value of a DataField
.
I suspect that there is a very logical way to do this but I am missing it. I am able to add controls and data via the pre-render event but is there an easier better way?
Use the TemplateField and place into it buttons or linkbuttons with appropriate CommandName property: ButtonField.CommandName Property You may set this button text using DataBinder.Eval method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With