cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Can I Change background color cell in a grid dynamically?

Carlos97
4-Participant

Can I Change background color cell in a grid dynamically?

I made this mashup 

CC_9592114_0-1610734361056.png

I want to know if i can change a background color of a cell in the grid advanced depending of a cell value

 

Ex. In the first grid i have a value of "Diametro" it is diameter in spanish, if the value is between  100 to 200

the background color will be green, but if the value is under 100  the color will be red

 

Can i do this with a service or another tool?

 

Ty

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Carlos97,

 

Cell-based state formatting indeed will not allow you to set limits dynamically. This should be achievable using a Configuration Service (Configuration property of Grid Advanced) as per Working with a Configuration Service by associating a stateDefinition to the column you want and use the service's input parameters to assign values.

 

Note that unlike what is stated here the example entities GridAdvancedExampleEntities.xml are not currently available on the PTC Software Download page. This has been reported so it can be added there. For now you will find the entities attached to this post.

View solution in original post

4 REPLIES 4
tdixit
13-Aquamarine
(To:Carlos97)

Hi @Carlos97 

 

Thank you for reaching out to us.

 

Please check this community post  How to Change Grid Cell Color Based upon value coming from Database 

It contains the steps and details of using the State Based Formatting which I think you need for your use case.

 

Let us know in case your use case differs.

 

Regards,

Toolika Dixit

Carlos97
4-Participant
(To:tdixit)

it´s almost what i was looking for, but i don´t want to hardcode the limits, i´ll took the value for a thing propertie

Hi @Carlos97,

 

Cell-based state formatting indeed will not allow you to set limits dynamically. This should be achievable using a Configuration Service (Configuration property of Grid Advanced) as per Working with a Configuration Service by associating a stateDefinition to the column you want and use the service's input parameters to assign values.

 

Note that unlike what is stated here the example entities GridAdvancedExampleEntities.xml are not currently available on the PTC Software Download page. This has been reported so it can be added there. For now you will find the entities attached to this post.

slangley
23-Emerald II
(To:Carlos97)

Hi @Carlos97.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags