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)
column
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;
query1.BeginExecute(
(IAsyncResult result) => EntitiesLoaded<Table2>(result, tc),
query1);
ObservableCollection<Table1> bm = new ObservableCollection<Table1>();
DataServiceQuery<Table1> query2 = this.dataManagaer.Table2s;
query1.BeginExecute(
(IAsyncResult result) => EntitiesLoaded<Table2>(result, bm),
query1);
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.Columns.Add(comboColumn);
radGridView2.ItemsSource = tc;
Please could some suggest how this can be done.
Regards,
Ron
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)
column
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;
query1.BeginExecute(
(IAsyncResult result) => EntitiesLoaded<Table2>(result, tc),
query1);
ObservableCollection<Table1> bm = new ObservableCollection<Table1>();
DataServiceQuery<Table1> query2 = this.dataManagaer.Table2s;
query1.BeginExecute(
(IAsyncResult result) => EntitiesLoaded<Table2>(result, bm),
query1);
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.Columns.Add(comboColumn);
radGridView2.ItemsSource = tc;
Please could some suggest how this can be done.
Regards,
Ron