Hii all
Below is the code i wrote to fill the daragrid
con.Open()
Dim cmd As MySqlCommand = New MySqlCommand("select * from demodata where name='" + ComboBox1.Text + "'", con)
Dim ds As New DataSet("demodata")
Dim da As MySqlDataAdapter = New MySqlDataAdapter(cmd)
da.Fill(ds)
Datagrid1.ItemsSource = ds.Tables(0).DefaultView
con.Close()
and this is the xaml code
ComboBox Height="23" HorizontalAlignment="Left" Margin="344,302,0,0" Name="ComboBox1" VerticalAlignment="Top" Width="120" ItemsSource="{Binding}">
<ComboBoxItem Content="ss" />
<ComboBoxItem Content="s" />
</ComboBox>
i have both s and ss names in DB but when i m selecting its not showing me the values in the grid..
please tell me the error...