I have a data table whose defaultview.sort is already set, and the datatable is filled with data, what I am trying to do is add a row to the datatable, but i need this row to always be the first row, and the rest of the table to be sorted normaly, here is my code:
//Sort the datatable
dt.DefaultView.Sort = "DisplayFiled";
//Add the fixed row
DataRow dr = dt.NewRow();
dr["ValueField"] = String.Empty;
dr["DisplayField"] = "All";
dt.Rows.InsertAt(dr, 0);`
You can accomplish this by adding a 2nd column to sort on
When you add a row you set UserAdded = true to force it to show up first