Page 1 of 1

Web list single cell style

Posted: Thu Apr 14, 2016 6:43 pm
by avescovi
Hi,

I'am working on the data validation of a list in LANSA web.
When I detect an error on a cell, I would like to set its borders red. But at the moment I found only the way to set the border of the whole row and not for the single cell.

It is possible to control/set the style of a single cell?

Thanks

Re: Web list single cell style

Posted: Thu Apr 14, 2016 7:58 pm
by Stewart Marshall
All visual lists in VL have a CurrentItem property. However, Prim_list takes this a step further providing a CurrentItem property on individual columns.

So, you might define your style as below

Code: Select all

Define_Com Class(#prim_vs.Style) Name(#Error) Bordercolor(Red) Borderbottom(1) Borderleft(1) Borderright(1) Bordertop(1)
and you can then assign it to a column currentitem as below

Code: Select all

#ColumnXYZ.CurrentItem.Style <= #Error
Regards

Re: Web list single cell style

Posted: Thu Apr 14, 2016 10:03 pm
by avescovi
Hi,

Thank you for your quick reply.
It works only if I define the style as your. But my problem is that I don't want styles in the RP but only in a theme project (LANSA Theme).
As said in my first post, it's not possible to reach the style defined in the theme from a column.currentItem :

Code: Select all

* #lista.CurrentItem.ThemeDrawStyle := CampoInErrore
#ColumnUTGGRUT1.CurrentItem.Style <= #Style31
* #ColumnUTGGRUT1.CurrentItem.Style <= #CampoInErrore
The first is the way explained in the first post but it applies only for a whole row.
The second is your suggestion, it works only defining locally the style
The third one is what I want to do: assign to the cell the style or themed.rawstyle from a theme project.
(Note that #Style31 is a style and #CampoInErrore is a ThemeDrawStyle)

Thanks
Have a nice day

Andrea

Re: Web list single cell style

Posted: Thu Apr 14, 2016 11:16 pm
by Stewart Marshall
Hi Andrea

You can directly access the the styles defined within a Theme as follows

#Column.CurrentItem.Style <= #ThemeName<StyleName>

I think this is what you're after


Regards

Re: Web list single cell style

Posted: Fri Apr 15, 2016 12:11 am
by avescovi
Great, it works!

Thank you
Have a nice day