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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Priya LingePosted Jul 28, 2011, 3:09 AM
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.