I have a gridview that sets the AutoGenerateEditButton="true"
How can I set the width of the resulting column?
I don't know if you can set the width when the Edit button is auto-generated.
But you can set it if you add the CommandField.
Steps:
The Command buttons (edit, cancel, update) will still behave as if you had auto-generated them, you just get more control over the layout.
I believe that you don't have direct control over the column containing the edit button - because of the "AutoGenerate" in the property you are setting, it is rendered automatically.
An alternative is to set AutoGenerateEditButton="False", and define a column containing the Edit command button yourself. Then in the markup, you can set the width of that column yourself.
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