This question is locked. New answers and comments are not allowed.
Hi all,
I'm working with the RadComboBox that I've placed inside my RadGridView Data Column Header. I've tried all types of ways to bind this combo box without success. I'm wanting to bind from code behind and I'd like to bind to a list. My list if populated using WCF.
When my list is populated with the WCF results I then try to set the combo box item source to my list but that's giving me the object reference not set to an instance.....error....
Can you provide some code samples?
Here is what I've tried so far:
XAML for RadComboBox inside Header
<telerik:GridViewDataColumn Width=".10*" Background="#6DFFFFFF">
<telerik:GridViewDataColumn.Header>
<telerik:RadComboBox x:Name="cboType" ItemTemplate="{StaticResource dropDownTemplate }">
</telerik:RadComboBox>
</telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>
C# (Just bare code to show you the data return and binding)
void client_GetRotarySystemsCompleted(object sender, GetRotarySystemsCompletedEventArgs e)
{
try
{
if (e.Cancelled == false && e.Error == null && e.Result != null)
{
DATASystem = e.Result;
}
}
finally
{
AppBusy.SetNotBusy();
}
LoadCombo();
}
public void LoadCombo()
{
cboType.ItemsSource = from af in DATASystem
select af.CAB;
}
I'm working with the RadComboBox that I've placed inside my RadGridView Data Column Header. I've tried all types of ways to bind this combo box without success. I'm wanting to bind from code behind and I'd like to bind to a list. My list if populated using WCF.
When my list is populated with the WCF results I then try to set the combo box item source to my list but that's giving me the object reference not set to an instance.....error....
Can you provide some code samples?
Here is what I've tried so far:
XAML for RadComboBox inside Header
<telerik:GridViewDataColumn Width=".10*" Background="#6DFFFFFF">
<telerik:GridViewDataColumn.Header>
<telerik:RadComboBox x:Name="cboType" ItemTemplate="{StaticResource dropDownTemplate }">
</telerik:RadComboBox>
</telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>
C# (Just bare code to show you the data return and binding)
void client_GetRotarySystemsCompleted(object sender, GetRotarySystemsCompletedEventArgs e)
{
try
{
if (e.Cancelled == false && e.Error == null && e.Result != null)
{
DATASystem = e.Result;
}
}
finally
{
AppBusy.SetNotBusy();
}
LoadCombo();
}
public void LoadCombo()
{
cboType.ItemsSource = from af in DATASystem
select af.CAB;
}