Ask a Question related to ASP.NET General, Design and Development.
-
Annick #1
Repeater: Data Depended Format Change
I would like to change the format of a cell depended on the value of
the data.
I wrote the following script, which works fine.
.. . .
Function function_ChangeFormat(ByVal value_01)
Dim decimal_temp As decimal
IF (value_01 Is Nothing)
function_ChangeFormat = 1.000
decimal_temp = 0
Else
decimal_temp = decimal.Parse(value_01)
End If
If (decimal_temp < 0)
function_ChangeFormat = " <font color = 'red' > " & value_01 & "
</font> "
Else
function_ChangeFormat = " <font color = 'black' > " & value_01 & "
</font> "
End If
End Function
.. . .
<ItemTemplate>
<tr style="font: 9pt verdana; background-color:#ffdab9">
<td>
<%# DataBinder.Eval(Container.DataItem, "K01") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "K02") %>
</td>
<td style="font:9pt courier new">
<%# DataBinder.Eval(Container.DataItem, "K03") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "K04") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "K05") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "K06") %>
</td>
<td>
<%# function_ChangeFormat(DataBinder.Eval(Container.Da taItem,
"K07")) %>
</td>
</tr>
</ItemTemplate>
.. . .
However I would also like to change the background color. The
following doesn't produce an error message but also doesn't work.
If (decimal_temp < 0)
function_ChangeFormat = " <font color = 'red' ><style
background-color = 'yellow'> " & value_01 & " </style></font> "
Else
function_ChangeFormat = " <font color = 'black' ><style
background-color = 'white'> " & value_01 & " </style></font> "
End If
Why doesn't it work? How do I get it to work?
Annick
Annick Guest
-
Linking data, searching data, and format the data file
I'm sorta new to flash and integrating data and components...I'm usu. an interface designer. I'm trying to link a combo box to a file doesn't... -
Repeater Data out of order?
I've got some calendar data coming across an HTTPService that looks like (I've removed some extra elements) ... <WEEK> <DAY PERIOD="1"... -
data repeater question
Hi, I have a quick question. I am displaying all the orders that are active. I am making use of a datarepeater with checkboxes to display data... -
Change repeater name pattern
When I bind a server control to a repeater it renders one copy of this control for each item in the datasource collection. By doing this it changes... -
How to change the color of a row (Repeater)?
Hi, I have 3 controls on a page. 1.- Dropdown (dd) 2.- Repeater (r1) 3.- Repeater (r2) The page works as follows. On Page load (not postback)...



Reply With Quote

