Hi All,
I have a DataGrid which is Grouped by some name "XYZ".Now when i am running that Groupname is showing that Grid.Can anyone help me out on how to Hide the Groupname in DataGrid in Silverlight.
Thanks,
Prasant
Hide Groupname in Silverlight
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Priya LingeRank #785 · 2.9K reputationPosted Jul 27, 2011, 11:09 PM EDT
can you please tell me GroupName is the column Name in your datagrid.
if yes, you can hide the column in datagrid by following way,
AutoGeneratingColumn event of datagrid.
Void datagrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
{
DataGridTextColumn tcolumn=(DatagridTextColumn) e.Column;
string headercolumn=e.column.Header.ToString();
if(headercolumn=="GroupName")
{
tcolumn.Visibility=Visibility.Collapsed;
}
Hope this will help you.
Thanks.