Some times it is required to hide a particular column or of a grid view or data grid then you can use this function below:
public static void HideGridColumn(DataGrid dgParticipantList, string columnName)
{
GridColumn gridColumn = dgParticipantList.Columns.FindByUniqueNameSafe(columnName);
if (gridColumn != null)
{
gridColumn .Visible = false;
}
}
No comments:
Post a Comment