Sorting a Data-Bound ComboBox
To fix this, I had to manually set the Sort property of the column I wanted the combo box to be ordered by on the BindingSource used by the control as follows before calling the Fill method on the table adapter :-
myViewBindingSource.Sort = "ID";
myViewTableAdapter.Fill(myDataSet.myView);
Why can't it pick up the order by clause in my view automatically?

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home