cancel
Showing results for 
Search instead for 
Did you mean: 

Partial color fill in one of the column in a iGrid

Former Member
0 Kudos

Hi,

Is there any way to set one of the column in a grid partially filled with a color.

Eg:- 75% of a cell in a column should filled ( horizontally ) with a color if the value of the column is 75 and other columns are data columns.

I may be asking too much. But I am wondering is it really possible in xMII 11.5 and/or 12.x.

Thanks in advance.

Srinivas.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are also a few tricks that you could use to achieve this:

First approach:

Fill 10 virtual column values with a specific character or a space. Depending on the font, you could use something as simple as an asterisk (*) for the BlockChar or a more "exotic" character code.

- Use a BLS query to add 10 "calculated" columns to the actual data query, and use expressions such as:

VirtualColumn0: stringif(ColumnValue >= 10,BlockChar," ")

VirtualColumn1: stringif(ColumnValue >= 20,BlockChar," ")

...

VirtualColumn9: stringif(ColumnValue >= 100,BlockChar," ")

- Define your iGrid and point it to the BLS query instead of the actual data query, and set the column headings in the "virtual columns" to a blank or dash

Second approach:

Basically the same as the first approach, but with one virtual column, and have your calculated column expression look like below (with nested stringifs):

VirtualColumn: stringif(ColumnValue >= 10,"",stringif(ColumnValue >= 20,"",stringif(ColumnValue >= 30,"*"....stringif(ColumnValue >= 100,"*********","")

Former Member
0 Kudos

Rick,

Thank you very much. I think this virtual column approach is good as we achieve it with in display template itself instead of writing in scripting this logic at client side page level.

I think my question is answered and I want to award points but some how I could find radio buttons to do so which I used to see earlier beside every reply and mark as answered.

Thanks,

Srinivas.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

We had a similar requirement for a client.

Based on the staus, we have given colors to the row.

We have provided a filter which contains all the status messages just above the grid. (HTML drop down or ibrowser).

Based on the selected status we can show them the Production Orders. When "All" status is selected it will show all the production orders with color indicated rows.

Regards,

Kishore kumar

Former Member
0 Kudos

Hi Srinivas,

Giving partial color to the columns / rows of the grid wont be possible, because display grid is standard xMII template and we cannot modify this.

But, I think that using the 'Lights' in your display grid is most appropriate (and advisable) solution for your scenario. My team have been asked by client in previous project to display certain records in similar fashion, where I stepped-in and convinced the client to use Display Grid in 'Lights' mode.

Here is an excellent example.

http://erpbuzz.com/step-by-step-guide-how-to-show-color-lights-inside-sap-xmii-display-grid-p1.php

I hope this helps.

Thanks.

Former Member
0 Kudos

You would be able to do this with something like Extjs (www.extjs.com) and a custom renderer.

jcgood25
Active Contributor
0 Kudos

Not with the standard behaviors, the iGrid color contexting applies to either the full cell background, the text, or the entire row background.

What is the significance of 75% and the context of the data? Perhaps there would be another way to provide visibility to this information using standard grid types, but not in a gantt chart approach.

Former Member
0 Kudos

Jeremy,

I will mention the scenario. A list of orders needs to be listed in a table format order# and several other columns belongs to order. In this table one of the column is status on that particular order. We want to represent the status as horizontal bar which should depends on value of "status" column.

Let me know if I need to provide more info.

Thanks,

Srinivas.

Former Member
0 Kudos

Hello Srinivas,

This is not possible with a grid applet. You can use captions in your grid and set its type as "Lights Mode".

Or you can use HTML and javascript to build your grid manually.

Applet overview

http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/Applet_Overview.htm

Danilo