I need to sort a data table and load that data table values to a combo box.Then I need to add a new row called 'All' and it should appear at the top of the combo box items.Here is my work so far,
DataTable dt = bLStatus.GetStatusDetail();
if (dt != null && dt.Rows.Count > 0)
{
dt.DefaultView.Sort= "Description ASC";
cmbCurrentStatus.DataSource = dt;
cmbCurrentStatus.ValueMember = "Description";
cmbCurrentStatus.DisplayMember = "Description";
DataRow row = dt.NewRow();
row["Description"] = "All";
dt.Rows.InsertAt(row, 0);
}
Problem is Row 'All' gets sorted as well,I need to display the row at top How to solve this? Any help will be appreciated.