How to include a new row in a Dataset

I am populating a combo box using a dataset. I manually add one row to the dataset by using this code.
cboMP.DataSource = rsMP.Tables[0];
cboMP.DisplayMember = "marketing_program";
cboMP.ValueMember = "program_id";
rsMP.Tables[0].Rows.Add("");

I want the row that I am adding to be the first item in the combo box instead it ends up being the last item. Is there a way for me to move this item all the way to the top. I dont have permission to add a new row in the table.

pratikshahseAsked:
Who is Participating?
 
JimBrandleyConnect With a Mentor Commented:
This will do it.

DataRow row = rsMP.Tables[0].NewRow();
rsMP.Tables[0].Rows.InsertAt(row, 0);

Jim
0
 
p_davisCommented:
try the insertat method
dataset.tables[0].rows.insertat(row,0)
0
 
p_davisCommented:
uhh, that's basically what i said....
--no matter
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.