silverlight,刷新用户控件中的DataGrid...
/// <summary>
/// 根据选择的部门节点,加载部门列表信息
/// </summary>
private void bindDeptGrid(int nodeNo)
{
orgClient.GetOrgAllByParentIDAsync(nodeNo, "");
orgClient.GetOrgAllByParentIDCompleted += new EventHandler<GetOrgAllByParentIDCompletedEventArgs>(orgClient_GetOrgAllByParentIDCompleted);
}
void orgClient_GetOrgAllByParentIDCompleted(object sender, GetOrgAllByParentIDCompletedEventArgs e)
{
//绑定到部门列表上
ObservableCollection<OrgService.Organization> orgList = e.Result;
DeptTopThree deptTopThree = new DeptTopThree();
((DataGrid)deptTopThree.FindName("DeptGrid")).ItemsSource = orgList;
//绑定成功后,不显示数据...
//此时应该怎么办
//to do...
}