# Change row background color in a Data Grid

**URL:** <https://community.weweb.io/t/change-row-background-color-in-a-data-grid/10177>\
**Category:** How do I?\
**Created:** [August 9, 2024, 12:18pm UTC](https://community.weweb.io/t/change-row-background-color-in-a-data-grid/10177 "2024-08-09T12:18:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sambhavi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sambhavi/32/11978_2.png) [@Sambhavi](https://community.weweb.io/u/Sambhavi)\
**Post date:** [August 9, 2024, 12:18pm UTC](https://community.weweb.io/t/change-row-background-color-in-a-data-grid/10177/1 "2024-08-09T12:18:35Z")

</div>

Hello,

I would like to change the background color of a row in a Data Grid when the checkbox is checked or simply clicked. Is this possible?

I did read [an earlier post](https://community.weweb.io/t/change-datagrid-row-background-color-on-click/1289), and would like to know if there are any alternatives as the post is 2 years old.

Thanks!

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [August 14, 2024, 6:35am UTC](https://community.weweb.io/t/change-row-background-color-in-a-data-grid/10177/2 "2024-08-14T06:35:13Z")

</div>

Hey @Sambhavi!

You have that option in the Datagrid style panel  
 ![CleanShot 2024-08-14 at 08.33.57](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/1039efb812794b81b06b6e6f0ce0523189a0ab7d.png)

---

<div class="post-metadata">

**Author:** ![Sambhavi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sambhavi/32/11978_2.png) [@Sambhavi](https://community.weweb.io/u/Sambhavi)\
**Post date:** [August 14, 2024, 8:57am UTC](https://community.weweb.io/t/change-row-background-color-in-a-data-grid/10177/3 "2024-08-14T08:57:46Z")

</div>

Thanks @jptrinh . Let me try that option and post an update.

---

<div class="post-metadata">

**Author:** ![tcowing](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@tcowing](https://community.weweb.io/u/tcowing)\
**Post date:** [December 1, 2024, 2:45am UTC](https://community.weweb.io/t/change-row-background-color-in-a-data-grid/10177/4 "2024-12-01T02:45:40Z")

</div>

As I understand it, that works if you “allow selection” in the data grid settings. In other words, when you click the checkbox in a given row, the row color will change.

Is there a way to change the row color on click? I want to have different actions happen when a row is selected and when a row is clicked. It would be nice if I could have different row colors for each event to indicate to the user which on has happened: the row has selected by clicking in check box or if the row has simply just been clicked.

Thanks!
