调用数据库里面的数据,绑定到Combobox中,出现了如图所示的异常
下面是代码
Code
private void BindData()
{
SLServiceClient ssl = new SLServiceClient();
ssl.getGroupsCompleted += new EventHandler<getGroupsCompletedEventArgs>(ssl_getGroupsCompleted);
ssl.getGroupsAsync();
}
void ssl_getGroupsCompleted(object sender, getGroupsCompletedEventArgs e)
{
cbGroup.ItemsSource = e.Result;
cbGroup.DataContext = "GroupName";
}
高手帮我看看哪里出问题了啊?