Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Color the background's cell in a grid view

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Color the background's cell in a grid view

Unread post by yvesf »

Hello,

I would like to color the background's cell in a grid view. Let's assume, I have a status which takes different color based on its name.
My column status takes the following different value :
Done - green color
In Progress - orange color
Urgent - red color.

Depending on the status value, I would like to have the cell's status changing from red, orange or green color.
cellcolor.PNG
Many thanks for anyone that knows how to perform that. I need to know what type of column do I have to create and how to associate a color background to specific values.

Yves
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Color the background's cell in a grid view

Unread post by kev1n »

See here: viewtopic.php?t=11588

Then use a switch statement for the different values.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Color the background's cell in a grid view

Unread post by yvesf »

Thanks Kev1n, brilliant !!! In general, where do you put the functions ? I have put them in the header giving them accessible everywhere in the application, is there another place to put them ?

Yves
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Color the background's cell in a grid view

Unread post by kev1n »

Generally speaking, put it in the header or in an external file, if more than one form is going to use the function or in the form's custom code if it's specific to a form/used in one form.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Color the background's cell in a grid view

Unread post by kev1n »

I hope that helped..
Post Reply