Hi All,
This is an urgent need so your prompt response will be highly appreciated.
In our project we have a silverlight radgrid and we need to bind different columns of this grid with different data sources. For example, suppose I have 3 columns in the grid and the last (i.e, 3rd) column contains a dropdown. Now the complete grid is populated by using an observable collection while the last column containing drop down is populated by some another observable collection. The problem we are facing at present is that we are not able to see the data in the dropdown. Here is what we are doing:
In the XAML file:
In the code behind file:
Here,
This is an urgent need so your prompt response will be highly appreciated.
In our project we have a silverlight radgrid and we need to bind different columns of this grid with different data sources. For example, suppose I have 3 columns in the grid and the last (i.e, 3rd) column contains a dropdown. Now the complete grid is populated by using an observable collection while the last column containing drop down is populated by some another observable collection. The problem we are facing at present is that we are not able to see the data in the dropdown. Here is what we are doing:
In the XAML file:
<
telerik:RadGridView
x:Name
=
"grid"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Name"
DataMemberBinding
=
"{Binding Name}"
/>
<
telerik:GridViewDataColumn
Header
=
"Age"
DataMemberBinding
=
"{Binding Age}"
/>
<
telerik:GridViewComboBoxColumn
Header
=
"Country"
DataMemberBinding
=
"{Binding CountryID}"
UniqueName
=
"Country"
SelectedValueMemberPath
=
"CountryID"
DisplayMemberPath
=
"CountryName"
>
</
telerik:GridViewComboBoxColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
In the code behind file:
grid.ItemsSource = lstTestData;
((GridViewComboBoxColumn)this.grid.Columns["Country"]).ItemsSourceBinding = lstCountry;
Here,
lstTestData : is the observable collection we are fetching from web service to bid the grid
lstCountry : is another observable collection we are fetching from web service specifically for combo box
Can you please urgently share your thoughts/comments with me. It would be great if you could please provide some code snippet along with that as well.
Cheers,
Shiva