<p>I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case).  </p>

<p>If that is the case then the question becomes what is the best way to sort a DataTable?</p>

<p>The combo box bindings are set in the designer initialize using</p>

<p><pre><code>myCombo.DataSource = this.typedDataSet;
myCombo.DataMember = "Table1";
myCombo.DisplayMember = "ColumnB";
myCombo.ValueMember = "ColumnA";</pre></code></p>

<p>I have tried setting
<pre><code>this.typedDataSet.Table1.DefaultView.Sort = "ColumnB DESC";</pre></code>
But that makes no difference, I have tried setting this in the control constructor, before and after a typedDataSet.Merge call.</p>

[{'answer_id': 29735, 'author': 'Andy Rose', 'author_id': 1762, 'author_profile': 'https://Stackoverflow.com/users/1762', 'pm_score': 0, 'selected': False, 'text': '<p>Does the data need to be in a DataTable?\nUsing a SortedList and binding that to a combo box would be a simpler way.</p>\n\n<p>If you need to use a DataTable you can use the Select method to retrieve a DataView and pass in a sort parameter.</p>\n\n<pre><code>DataView dv = myDataTable.Select("filter expression", "sort");\n</code></pre>\n'}, {'answer_id': 29738, 'author': 'Matt Hamilton', 'author_id': 615, 'author_profile': 'https://Stackoverflow.com/users/615', 'pm_score': 2, 'selected': False, 'text': '<p>You can actually sort the <a href="http://msdn.microsoft.com/en-us/library/system.data.datatable.defaultview.aspx" rel="nofollow noreferrer">default view</a> on a DataTable:</p>\n\n<pre><code>myDataTable.DefaultView.Sort = "Field1, Field2 DESC";\n</code></pre>\n\n<p>That\'ll sort any rows you retrieve directly from the DataTable.</p>\n'}, {'answer_id': 29740, 'author': 'jfs', 'author_id': 718, 'author_profile': 'https://Stackoverflow.com/users/718', 'pm_score': 4, 'selected': True, 'text': '<p>If you\'re using a DataTable, you can use the (DataTable.DefaultView) <a href="http://msdn.microsoft.com/en-us/library/system.data.dataview.sort.aspx" rel="nofollow noreferrer">DataView.Sort</a> property. For greater flexibility you can use the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.aspx" rel="nofollow noreferrer">BindingSource</a> component. BindingSource will be the DataSource of your combobox. Then you can change your data source from a DataTable to List without changing the DataSource of the combobox.</p>\n\n<blockquote>\n  <p>The BindingSource component serves\n  many purposes. First, it simplifies\n  binding controls on a form to data by\n  providing currency management, change\n  notification, and other services\n  between Windows Forms controls and\n  data sources.</p>\n</blockquote>\n'}, {'answer_id': 29752, 'author': 'urini', 'author_id': 373, 'author_profile': 'https://Stackoverflow.com/users/373', 'pm_score': 0, 'selected': False, 'text': '<p>The simplest way to sort a ComboBox is to use the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.sorted.aspx" rel="nofollow noreferrer">ComboBox.Sorted</a> property. However, that won\'t work if you\'re using data binding. In that case you\'ll have to sort the data source itself.</p>\n\n<p>You can use either a <a href="http://msdn.microsoft.com/en-us/library/ms132319(VS.80).aspx" rel="nofollow noreferrer">SortedList</a> or <a href="http://msdn.microsoft.com/en-us/library/f7fta44c.aspx" rel="nofollow noreferrer">SortedDictionary</a> (both sort by the Key), or a <a href="http://msdn.microsoft.com/en-us/library/system.data.dataview.aspx" rel="nofollow noreferrer">DataView</a>.</p>\n\n<p>The DataView has a <a href="http://msdn.microsoft.com/en-us/library/system.data.dataview.sort.aspx" rel="nofollow noreferrer">Sort</a> property that accepts a sort expression (string) for example:</p>\n\n<pre><code>view.Sort = "State, ZipCode DESC";\n</code></pre>\n\n<p>In the above example both State and ZipCode are columns in the DataTable used to create the DataView.</p>\n'}, {'answer_id': 29939, 'author': 'Andy Rose', 'author_id': 1762, 'author_profile': 'https://Stackoverflow.com/users/1762', 'pm_score': 1, 'selected': False, 'text': '<p>Make sure you bind the DefaultView to the Controls Datasource, after you set the Sort property, and not the table:</p>\n\n<pre><code>myCombo.DataSource = this.typedDataSet.Tables["Table1"].DefaultView;\nmyCombo.DisplayMember = "ColumnB";\nmyCombo.ValueMember = "ColumnA";\n</code></pre>\n'}, {'answer_id': 694881, 'author': 'Adam Robinson', 'author_id': 82187, 'author_profile': 'https://Stackoverflow.com/users/82187', 'pm_score': 0, 'selected': False, 'text': "<p>I realize that you've already chosen your answer to this question, but I would have suggested placing a DataView on your form, binding it to your DataSet/DataTable, and setting the sort on the View in the designer. You then bind your combobox to the DataView, rather than the DataSet/DataTable.</p>\n"}, {'answer_id': 1272196, 'author': 'David Veeneman', 'author_id': 93781, 'author_profile': 'https://Stackoverflow.com/users/93781', 'pm_score': 1, 'selected': False, 'text': '<p>Josh Smith has a <a href="http://joshsmithonwpf.wordpress.com/2007/06/20/displaying-sorted-enum-values-in-a-combobox/" rel="nofollow noreferrer">blog post</a> that answers this question, and does it all in XAML.</p>\n'}]
['https://Stackoverflow.com/questions/29731', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2253/']