It has a RadComboBox in WPF WEB, which is filled at runtime through a database call. This data set is assigned to combo through instructions similar to the following:
dim myNewItem as RadComboBoxItem
myRadCombo.items.clear
For each CurrentRow as DataRow in myDataset.tables(0).Rows
myNewItem = new RadComboBoxItem
With myNewITem
. Content = "some text"
. Tag = "some value"
. Foreground = New solidcolor (Colors.Some color)
End with
myRadCombo.Items.Add (myNewItem)
myNewItem = Nothing
Next
So far so good, the combo is filled smoothly, and deployed elements of the query product loaded ..... however when an item in the combo is selected, the application displays an error abruptly "Object reference not set to an instance of an object ".
I really do not understand the occurrence of this error if correct .... how is it necessary any additional statement with the XML?
Some XAML code:
<telerik:RadToolBar IsEnabled="True" Name="myToolBar" Grid.Row="3">
<telerik:Label Content="Workstation Name:" />
<telerik:RadComboBox Name="WorkStationList" Width="100" IsReadOnly="True">
<telerik:RadComboBoxItem Content="Station 1" IsSelected="True" Tag="1" />
<telerik:RadComboBoxItem Content="Station 2" Tag="2"/>
<telerik:RadComboBoxItem Content="Station 3" Tag="3"/>
<telerik:RadComboBoxItem Content="Station 4" Tag="4"/>
</telerik:RadComboBox>
</telerik:RadToolBar>