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
Web list single cell style
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Web list single cell style
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
and you can then assign it to a column currentitem as below
Regards
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)Code: Select all
#ColumnXYZ.CurrentItem.Style <= #ErrorRe: Web list single cell style
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 :
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
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 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
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Web list single cell style
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
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
Great, it works!
Thank you
Have a nice day
Thank you
Have a nice day