Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Cell based formatting in Grids

$
0
0
Cell based formatting in Grids
Web Connection 5.0
Cell based formatting in Grids
11/05/2012
12:53:22 AM
3MY01WNKMShow this entire thread in new window
Gratar Image based on email address
From:
Luca
To:
All 
Attachments:
None
Dear friends,
I would like to reproduce grid dynamic cell formatting like in the Class wwWebDataGrid Help example: some cells has red background and white forecolor.
I have a grid column with expression pointing to a function:

<ww:wwWebDataGridColumn ID="Column3" runat="server" Expression="this.page.GridColors(Field1)" HeaderText="IP"></ww:wwWebDataGridColumn>

then I have the function setting ActiveColumnAttributeString (Field1 is character, Field1 is logical:):

************************FUNCTION GridColors(m.Field1)************************WITHthisIFQuery.Field2=.T. .Grid1.ActiveColumnAttributeString="style='background:red;'"ENDIFRETURN m.Field1ENDWITHENDFUNC

This runs right, but I have ever text forecolor black, so I made a CssClass in my stylesheet to have forecolor white on background red:

.TextWhiteBackRed {color: #FFFFFF; background-color: #FF0000; }

and modified the function as follow:

************************FUNCTION GridColors(m.Field1)************************WITHthisIFQuery.Field2=.T. .Grid1.ActiveColumnAttributeString="CssClass=TextWhiteBackRed'"ENDIFRETURN m.Field1ENDWITHENDFUNC

but unfortunately it does not work.
Please some suggestion?
Thank you very much


Viewing all articles
Browse latest Browse all 10393

Trending Articles