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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How to Change Grid Cell Color Based upon value coming from Database Service

sdaram
1-Newbie

How to Change Grid Cell Color Based upon value coming from Database Service

Hi ,

I have a datagrid . I am Binding data to datagrid By Calling service. In Service i am executing Stored procedure . So Basically data is coming from Database. I have to Change

individual Grid Column values. based upon database column value.

I have to  display color like above. For your info

For Every Column that is binding we have separate color column based upon color column we have to change respective grid cell color.

Please guide me how to get this approach.

Thanks& Regards

Spandhana

3 REPLIES 3
supandey
19-Tanzanite
(To:sdaram)

spandana, you will have to create state based formatting and assign colors for e.g.

1. Create State Definition navigate to Composer > Visualization > Sate Definitions > New

2. Navigate back to your Mashup select the Grid in the Properties for the Grid click on the State Formatting Value for RowFormat, like so

3. On the Configure State Formatting window , select Sate based formatting and then select the state definition created

Hope this helps.

Hi Sushant ,

Thank you for quick reply,

In the way explained we can change Grid Cell Color. But we are Explicitly giving certain condition that to we are Hard-Coding Numeric Range this is static approach.

My Scenario is different. I will Explain in detail.

I have column1 ,column2 ........column n in datagrid. I am Binding data to datagrid using Stored Procedure. If u see my resultset.

Timerv (4:10 Expired) , TimerStatus (Red) -----(Timer v is -->  Display Column in Datagrid and TimerStatus --> is color value like "RED") . Based Upon this TimerStatus Grid Value need to change.

Similarly for other columns.

Hope you understand my scenario well. Please help me in this part. Thanks in advance.

Regards

Spandhana

sdaram
1-Newbie
(To:sdaram)

Issue got resolved thank you using Dependent column in StateFormatting

Top Tags