Re: Conditional color - datagrid
- From: "Brett Lonsdale" <brett@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 5 Feb 2006 12:07:39 -0000
You have conditional formatting with the Dataview webpart. You can use it
to access relational data including SQL!, webservices, xml, server side
script etc. You don't even have to put up with it unghosting pages.
Brett
www.combined-knowledge.com
"Santiago" <santiago.ortino@xxxxxxxxx> wrote in message
news:1138995090.032286.178360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, i´m creating a web part (using vb.net) that has a datagrid
connected to msSQL.
i 'd like to use conditional columns, where de forecolor, fontcolor
changes depending on some condition. The problem's that i cant do it, i
tried with this code:
Private Sub dg_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dg.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
If e.Item.Cells(1).Text = "Green" Then
CType(e.Item.Cells(1).FindControl("column1"),
TextBox).BackColor = Color.DarkGreen
End If
End If
End Sub
but it doesn't work
any idea?
thanks
.
- Follow-Ups:
- Re: Conditional color - datagrid
- From: Santiago
- Re: Conditional color - datagrid
- References:
- Conditional color - datagrid
- From: Santiago
- Conditional color - datagrid
- Prev by Date: Failed getting free/busy information - Unable to connect to the server
- Next by Date: RE: SPS2003 and SQL 2005 ReportServer
- Previous by thread: Conditional color - datagrid
- Next by thread: Re: Conditional color - datagrid
- Index(es):
Relevant Pages
|