Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I am new to silverlight,can i fill a combobox using Linq to Sql and WCF services in silverlight.

Thanks,
swapna.
Posted
Updated 27-Jan-11 17:14pm
v3

Why do people keep posting 'how do I do this using XXX' ? Why do you need to use those things ? Use them to create the data source if you want, but data binding always works the same.
 
Share this answer
 
VB
Public Class Connectionclass

    Private Sub btnins_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnins.Click
        cboname.SelectedItem = txtn.Text
    End Sub


End Class
 
Share this answer
 
private void CategoryParent()
{
    using (SqlConnection Con = GetConnection())
    {
        SqlDataAdapter da = new SqlDataAdapter("Select Category.Category from Category", Con);
        DataTable dt = new DataTable();
        da.Fill(dt);
        CBParent.DataSource = dt;
        CBParent.DisplayMember = "Category";
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900