# Background color in data list viewer Classic UI

**URL:** <https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602>\
**Category:** Questions about Thunkable X\
**Created:** [February 12, 2023, 7:02pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602 "2023-02-12T19:02:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedegarcia30hzc97a](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@fedegarcia30hzc97a](https://community.thunkable.com/u/fedegarcia30hzc97a)\
**Post date:** [February 12, 2023, 7:02pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/1 "2023-02-12T19:02:17Z")

</div>

Hi

I have a DLV and id like it to have different background colors in each row.  
Ive tried creating my own DVL 🙂  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/3/1327fe3f3d291739edca911e121acd87b122dc92.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/c/5c5626b7e424a146adc5faadd77c5f1cbeb4f809.png)

in the project where im using the DVL im trying to change it based in on the number of rows…buts not working

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/1/a1f9e83e3dbdac907ee7f9c731aa499876d3cced.png)

As you can see all the rows have the same color  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/3/f3c9dba4dc7611603abda382d393091d627ec2ec.png)

Any thoughts?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 12, 2023, 7:40pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/2 "2023-02-12T19:40:16Z")

</div>

You created a loop from 1 to [list of values]. The [list of values] block returns a list (1, 2, 3, 4, 5) but the [count with] block needs an integer. Please try using the [number of rows] Data Source block instead. Or – just for testing purposes – hard code it by typing in 5 and see if it works that way first.

I also think that the row id may need to be an actual row id and not a number. We can use numbers with Data Source blocks but I’m pretty sure with DVL blocks it needs to be an actual row id.

See this:

> [@Painting the DVL with Layouts (beta)](https://community.thunkable.com/t/painting-the-dvl-with-layouts-beta/2182484):
>
> Anyone have any tips for “painting the DVL” in DnD using Layouts? For reference, see this: [Conditional Formatting of a Data Viewer List (aka "Painting the DVL")](https://community.thunkable.com/t/conditional-formatting-of-a-data-viewer-list-aka-painting-the-dvl/2078697). I created a Layout in a DnD project and saved the outer container as a custom data viewer layout. I then selected it in the same project as the DVL layout on a different screen. I’m finding that any attempts I make to change the background color for a container using that method fail. As you can see in the screenshot below, I’ve tried…

---

<div class="post-metadata">

**Author:** ![fedegarcia30hzc97a](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@fedegarcia30hzc97a](https://community.thunkable.com/u/fedegarcia30hzc97a)\
**Post date:** [February 12, 2023, 8:23pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/3 "2023-02-12T20:23:46Z")

</div>

You are absolutely right! row id needs to be an actual rowID and not a number…this nos looks pretty cool.

I now want to figure out how to bring dows the size between rows.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/f/eff4e3163272b84b9a60b7acc85d208ad24270af.png)

This is the code that worked as per the tutorial you sent

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/8/18f7c881449b2412fe3d34e6161c25c7c2df70f5.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 12, 2023, 10:32pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/4 "2023-02-12T22:32:11Z")

</div>

The size between rows is determined by the margins and padding of the container (usually a row) in the DVL layout. If you create a custom DVL layout, you have control over those properties.

---

<div class="post-metadata">

**Author:** ![fedegarcia30hzc97a](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@fedegarcia30hzc97a](https://community.thunkable.com/u/fedegarcia30hzc97a)\
**Post date:** [February 12, 2023, 10:36pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/5 "2023-02-12T22:36:42Z")

</div>

Got it! Thanks for your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [May 13, 2023, 10:36pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/6 "2023-05-13T22:36:59Z")

</div>

Closed on May 13, 2023, 10:36pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [December 19, 2024, 4:59pm UTC](https://community.thunkable.com/t/background-color-in-data-list-viewer-classic-ui/2273602/7 "2024-12-19T16:59:59Z")

</div>

Unlisted on December 19, 2024, 4:59pm UTC


