Silverlight and Telerik ORM

2 posts, 0 answers
  1. rohan
    rohan avatar
    3 posts
    Member since:
    Nov 2010

    Posted 11 Apr 2011 Link to this post

    Hi ,

    I am using Silverlight with telerik ORM.
    Im my Sql database i have 2 tables

    Table1(For combobox)
    Id Name Description

    Table 2
    Id1 Name1 Id(of Table 1) Description

    using the dataservice wizard i have created the service class to these tables in Telerik ORM

    No i need to populate my radGrid view with data from Table2 and the data from Table1 should come as a combobox in the Id(of Table1)

    My code is as follows but i am unable to display the required out put.

    ObservableCollection<Table2> tc = new ObservableCollection<Table2>();

                DataServiceQuery<Table2> query1 = this.dataManagaer.Table2s;
                   (IAsyncResult result) => EntitiesLoaded<Table2>(result, tc),

                ObservableCollection<Table1> bm = new ObservableCollection<Table1>();

                DataServiceQuery<Table1> query2 = this.dataManagaer.Table2s;
                  (IAsyncResult result) => EntitiesLoaded<Table2>(result, bm),

                GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn();
                comboColumn.Header = " ID & Name";
                comboColumn.DataMemberBinding = new Binding("Id(of Table1)");
                comboColumn.SelectedValueMemberPath = "Id";
                comboColumn.DisplayMemberPath = "Name";
                comboColumn.ItemsSource = bm;
                comboColumn.ItemTemplate = this.Resources["ComboItemTemplate"] as DataTemplate;

                radGridView2.ItemsSource = tc;

    Please could some suggest how this can be done.

  2. Vlad
    Vlad avatar
    11100 posts

    Posted 14 Apr 2011 Link to this post


     Please check our combo column demos for more info about how to populate this column in various scenarios. 

    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top