Groups | Blog | Home
all groups > asp.net datagrid control > november 2004 >

asp.net datagrid control : Variable DataGrid Column Text


Alan Z. Scharf
11/23/2004 1:27:35 PM
1. Is there a way to make datagrid column text fill in from an expression?

2. I want column header text based on a lookup value from a UDF.

Thanks.

Alan

Alan Z. Scharf
11/23/2004 3:45:03 PM
Subject should be Variable Column HEADER Text



[quoted text, click to view]

Ken Cox [Microsoft MVP]
11/23/2004 10:17:39 PM
Not sure about the UDF, but if your datagrid isn't autogenerating the
columns, you should be able to get a column header like this:

Private Sub DataGrid1_PreRender _
(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles DataGrid1.PreRender
DataGrid1.Columns(0).HeaderText = "This could change" ' Could be an
expression?
End Sub

Is that what you meant?

Ken
MVP [ASP.NET]


[quoted text, click to view]
Alan Z. Scharf
12/8/2004 4:30:53 PM
Ken,

Yes. Thanks again.

Alan


[quoted text, click to view]

AddThis Social Bookmark Button