andrea.grub
|
Posted: 07/02/2003, 10:39 PM |
|
Hi
i currently have a Hotline-Journal made with CSS an ASP. How can i change
the row color of an entry according to the selection of a list selection.
List contain priority of the task. I would like to show higher priorities in
red rows, lower prios in yellow an so on.
Does any one can help me?
Thanks for your help
Andrea
|
|
|
DonB
|
Posted: 07/03/2003, 6:28 AM |
|
Try this:
Edit the grid in the Design panel and add multiple rows - one for each
priority code.
Bind the controls in each row to the same datasources
Go into the HTML and notive how the <!-- BEGIN Row --> and <!-- END Row -->
tags are surrounding all of the rows you created.
Separate the rows by putting more begin/end pairs - like Row1, Row2, Row3,
etc.
In the grid's BeforeShow event hide all rows
Row1.visible = false
Row2.visible = false
Row3.visible = false
in the grid's BeforeShowRow, put code to change the .Visible property on one
row, based on priority:
Select Case MyPriority
Case 1: row1.visible = true
Case 2: row2.visible = true
Case 3: row3.visible = true
End Select
Another way is to
Remove the html that makes the table row from the HTML, and put a Label in
its place
Set the label to accept HTML content
In the BeforeShowRow event add code to store the html you removed into the
Label. now you can change the html to splice in background color tags based
on the priority. Since you don't see the row until you execute the page,
this is a little harder to work with it (such as when you change columns
I have not tested the first approach, but it should work. I have made pages
doing the second way and it definitely works..
DonB
"andrea.grub" <andrea.grub@qwirt.com> wrote in message
news:be0fim$79s$1@news.codecharge.com...
> Hi
>
> i currently have a Hotline-Journal made with CSS an ASP. How can i change
> the row color of an entry according to the selection of a list selection.
> List contain priority of the task. I would like to show higher priorities
in
> red rows, lower prios in yellow an so on.
> Does any one can help me?
>
> Thanks for your help
> Andrea
>
>
>
|
|
|
|