AxpDataGrid

Column Headers

How to set Grid Column Headers and Form Captions

Method 1 - Use the property AxpDataGrid.GridDisplayFieldNames (comma separated list of column titles).
See also FormDisplayFieldNames.

E.g.
GridDisplayFieldNames="Name,Age,Sex"

To set a blank column header make sure to include a blank space :

GridDisplayFieldNames="Name, ,Sex"

It is also possible to have a mix of default and manually set column headers. If no characters are present for a specific column, the datasource column name will be used.
E.g.
GridDisplayFieldNames=",,Sex"

Note that GridDisplayFieldNames operates on all columns in the dataset, not only the visible columns.

Method 2 - Utilize the GridColumns and FormViewColumns collections

E.g.
[Visual Basic]
Private Sub AxpDataGrid1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxpDataGrid1.Load
  AxpDataGrid1.GridColumns("ProductName").Caption = "Product Name"
  AxpDataGrid1.FormViewColumns("ProductName").Caption = "Product Name"
End Sub

' The form edit captions can also be set using the EditFieldItem
' Example:

Dim edit1 As New Axezz.WebControls.EditFieldItem
edit1.ColumnName = "ProductName"
edit1.Caption="Product Name"
AxpDataGrid1.SetEditField(edit1)

See Also

AxpDataGrid Tutorial