Page 1 of 1

Visual Style in Grid Cell (SOLVED)

Posted: Wed Jul 24, 2019 6:08 pm
by PhilA
Hi,

If is possible to change the visual style of part of a cell in a grid.

I have a grid cell field that is 100 characters and I would like to change some of the text to a different visual style

Re: Visual Style in Grid Cell

Posted: Thu Jul 25, 2019 4:11 am
by lawingo
Try this:

Code: Select all

Set Com(#GridColumn6.Cell<1>.Column) VisualStyle(#FS_BLUE) 
#GridColumn6 is the name of the Column in your list
<1> is the Record Number

Re: Visual Style in Grid Cell (SOLVED)

Posted: Fri Aug 02, 2019 12:17 am
by PhilA
Hi lawingo,

Thanks for the reply but unless im mistaken this will change the whole cell to #FS_BLUE).

I want to know if there is any way to change part of the cell to a different visual style (eg change the 4-5 character to #FS_BLUE

Set Com(#GridColumn6.Cell<1>.Column) VisualStyle(#FS_BLUE)

Re: Visual Style in Grid Cell (SOLVED)

Posted: Fri Aug 02, 2019 8:32 am
by soa
If you want to change the colour of a sub-string of text in a cell you could create a reusable part containing a html control then set the text colour using html eg 'Hello <span style="color:blue">world<span>

Re: Visual Style in Grid Cell (SOLVED)

Posted: Mon Aug 05, 2019 5:35 pm
by PhilA
Hi Soa,

Thanks for your reply..

That sounds more promising...Would it be possible to use the reusable in a grid as there would be many lines that may need to be changed

Re: Visual Style in Grid Cell (SOLVED)

Posted: Mon Aug 05, 2019 5:54 pm
by soa
You can use a reusable in a grid. I did it a couple of years back. If you search this forum, you should fine some sample code. You need to experiment to see what the performance is like before committing to it as it wasn't great then but a lot of work has been done in this area since.

Re: Visual Style in Grid Cell (SOLVED)

Posted: Mon Aug 05, 2019 6:57 pm
by PhilA
Hi Soa,

I have found some examples of reusable in a grid but when i try to create a reusable using the HTML control
I get a message saying #PRIM_WEB.HtmlContainer is only supported on the web...

I am trying to use the grid in a Framework (Not on a webpage)

Re: Visual Style in Grid Cell (SOLVED)

Posted: Tue Aug 06, 2019 8:54 am
by soa
Sorry, I assumed that you were in VL Web land. In This case I don't know if what you ant can be achieved.