Change Header Text in Datagrid

TheWizardofInt

Well-known member
Joined
Dec 31, 1969
Messages
333
Location
Orlando, FL
I have a blank datagrid on my ASP.Net page

I fill it, which works, fine, except now the header text is all column names. I want it it be Address instead of address1, Created instead of CreateOn, etc

I thought this would work:

Code:
      With dgHomes
            .DataSource = CreateDataBindableView(sPrice)
            .DataBind()
            now lets brand with the data
            .Columns(sPrice).HeaderText = "Price"
            .Columns("Address1").HeaderText = "Address"
            .Columns("CreateOn").HeaderText = "Created"
            .Columns(sStatus).HeaderText = "Status"
            .Columns("RecID").Visible = False
            .Visible = True
       End With

What am I doing wrong?
 
Back
Top