Gets or sets the Column Header in Grid Mode or the Caption in Form View mode
The Column Header in Grid Mode or the Caption in Form View mode
This value can be set to override the data source Column names.
[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.GridColumns("ProductName").CellHtmlAttributes = "style=""text-align:center"""
AxpDataGrid1.GridColumns("ProductName").FormatCellFunction = "UCase"
AxpDataGrid1.GridColumns("ProductName").FreeFormatCell = "#ProductId#:<strong>#ProductName#</strong>"
AxpDataGrid1.GridColumns("ProductName").GridHeadHtmlAttributes = "style=""text-align:center"""
AxpDataGrid1.GridColumns("ProductName").Width = "200px"
AxpDataGrid1.GridColumns("ProductName").Visible = True ' Default is True, set to False to hide
AxpDataGrid1.GridColumns("ProductName").Wrap = False
End Sub
[C#]
private void AxpDataGrid1_Load(object sender, System.EventArgs e)
{
AxpDataGrid1.GridColumns["ProductName"].Caption = "Product Name";
AxpDataGrid1.GridColumns["ProductName"].CellHtmlAttributes = "style=\"text-align:center\"";
AxpDataGrid1.GridColumns["ProductName"].FormatCellFunction = "UCase";
AxpDataGrid1.GridColumns["ProductName"].FreeFormatCell = "#ProductId#:<strong>#ProductName#</strong>";
AxpDataGrid1.GridColumns["ProductName"].GridHeadHtmlAttributes = "style="\"text-align:center\"";
AxpDataGrid1.GridColumns["ProductName"].Width = "200px";
AxpDataGrid1.GridColumns["ProductName"].Visible = true; // Default is true, set to false to hide
AxpDataGrid1.GridColumns["ProductName"].Wrap = false;
}
DataColumn Class | Axezz.WebControls Namespace