This topic is locked

Change color of a custom button in a grid

7/18/2022 5:17:15 PM
ASPRunner.NET General questions
R
Rajesh author

I have a custom button in a grid, it is not associated with any field of the database record.
I want to change the color of this button in this particular row

I tried following in 'client after' event. but it did not work. (no error)

$row["rowstyle"]='style="background:orange"';

any suggestions?

TIA

T
Tim 7/25/2022

The only way I know to change the color of a custom button is, on the designer page with the button selected, change the "button style" dropdown (found along the right in the properties section). This is limited to some predefined boot-strap settings (I believe). So, for instance, you can select "danger" to make the button red, or select "warning" to make it orange, "success" to make it green, etc.

Thanks,
Tim