Abs
|
Posted: 09/01/2005, 7:21 AM |
|
Hi,
I was wondering its possible to show different coloured cell in a grid depending on the data returned to that row?
|
|
|
dataobjx
Posts: 181
|
Posted: 09/01/2005, 11:02 AM |
|
Yes it is possible.
In the first cell of the row, place a hidden cell named for instance, CSS.
Create a before show event and place the code you need to derive the indicators necessary to your idea.
For instance;
Dim intValue
intValue = MyGrid.DataSource.Recordset.Fields("field1")
Select Case intValue
Case 1
MyGrid.CSS.Value = "GrayAltDataTD"
Case 2
MyGrid.CSS.Value = "GrayFieldCaptionTD"
Case Else
MyGrid.CSS.Value = "GrayDataTD"
End Select
Then in the HTML of the page, locate the Cells for that Row... and replace the Class="GrayDataTD" to be Class="{CSS}"
That's all there is to it.
_________________
www.DataObjx.net
www.mydigitalapps.com |
|
|
Abs
|
Posted: 09/02/2005, 8:27 AM |
|
Thanks, I will try it
|
|
|
|