i was just reordering the columns of a silverlight datagrid in xaml.cs in the event
grid_autogenerating.i used the follwing code but stil it doesn't works out.
i was using
void grid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
{
switch (e.Column.Header.ToString())
{
case "Age":
{
e.Column.Visibility = Visibility.Visible;
e.Column.DisplayIndex = 1;
break;
}
case "AgeType":
{
e.Column.Visibility = Visibility.Visible;
e.Column.DisplayIndex = 2;
break;
}
}}