Gets or sets the width of the column
The width of the column as a string, f.ex. "100px", "50em", 10%"
[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