Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Format Gridview cell in code

1 view
Skip to first unread message

Jan Erik Hansen

unread,
Jan 31, 2008, 4:45:25 AM1/31/08
to
I have a gridview that I will output to an email.

I try to format a certain cell but it doesn't seem to have any effect,
Can i Set the htmlencode for a bound column = false in code?


I have this code:

Dim myGrid As New GridView

myGrid.DataSource = cart_ds

myGrid.DataBind()

'Formatering

myGrid.BackColor = Drawing.Color.LemonChiffon

Dim ii As Integer

For ii = 0 To myGrid.Rows.Count - 1

If myGrid.Rows(ii).RowType = DataControlRowType.DataRow Then

myGrid.Rows(ii).Cells(1).Text = String.Format("{0:c}",
myGrid.Rows(ii).Cells(1).Text)

End If

Next

myGrid.RenderControl(htmlTW)

regards

Jan Erik Hansen

Oslo


0 new messages