in wpf datagrid how to get the blank row on top? ie when user wants to add new row, it always comes at the bottom. But I want it to be on top ... can i do this in XAML ?
This answer depends greatly on how you are binding your DataGrid, specifically what the underlying type of your ItemsSource is. This answer assumes you are using an ObservableCollection. Since you mention WPF specifically, I also assume you mean .NET 4.0, since the DataGrid is only available in Silverlight 3 and .NET 4.0.
I assume that you are newing up a row by calling
ItemSource.Add(new MyObject());
To get the behavior you desire, use the following instead:
ItemSource.Insert(0, new MyObject());