http://www.codeproject.com/KB/webforms/Datagrid_Col_Example.aspx
private void HideShowColumns(DataGrid dg)
{
if(dg == null)
{
return;
}
// Loop through all of the columns in the grid.
foreach(DataGridColumn col in dg.Columns)
{
// Hide the Salary and SS# Columns.
if(col.HeaderText == "ExampleColumn")
{
col.Visible = false;
}
}
}
Thursday, September 16, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment