Silverlight / WPF - How do you set sort Data on a combibox getting data from Access Database Xaml Forms

Asked By David on 15-May-13 08:36 AM
How do you set sort Data  on a combobox getting data from Access Database Xaml Forms

I want the Data to be in a-z order but setting it in Access Data base still leaves them random
Robbe Morris replied to David on 15-May-13 08:37 AM
Are you performing an ORDER BY clause in your query?
David replied to Robbe Morris on 16-May-13 02:53 AM
Hi Robbe

I have a sort on dataset ascending.
I have a text box on top of a combi box with the following action but text is not sorted

Private Sub txtH2TEE_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles txtH2TEE.MouseDoubleClick
        txtH2TEE.Visibility = Windows.Visibility.Collapsed
        theCombo1.Visibility = Windows.Visibility.Visible
    End Sub


    Private Sub txtH2TEE_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.TextChangedEventArgs) Handles txtH2TEE.TextChanged


    End Sub


    Private Sub theCombo1_SelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs) Handles theCombo1.SelectionChanged
        txtH2TEE.Visibility = Windows.Visibility.Visible
        Placeholder = DirectCast(theCombo1.SelectedValue, DataRowView).Item(0)
        txtH2TEE.Text = Placeholder
        theCombo1.Visibility = Windows.Visibility.Collapsed
    End Sub
  Thanks David

David replied to Robbe Morris on 20-May-13 04:48 PM
Hi Robbe

All sorted by making a new table in Database and putting text in order I needed.
It would not work on sort a-z  but worked this way
Thanks

David