抛出所选项目的TargetInvocationException已更改

时间:2015-09-07 01:46:48

标签: c# wpf devexpress

当我更改另一个ItemSource的选择时,我尝试重新生成Devexpress TreeList的内容(TreeList)。但是,运行时会出现以下异常:

  

System.Reflection.TargetInvocationException

代码

    void treeListControl1_SelectedItemChanged(object sender, SelectedItemChangedEventArgs e)
    {
        string st = ww.nList.CurrentCellValue.ToString();
        System.Diagnostics.Debug.WriteLine(st);

        ww.treeList.ItemsSource = null;

        ww.treeList.ItemsSource = drawOrderBook(currCycle, st);
        // drawOrderBook is some complex method that generates the data to displayed based on the filter st and the static data currCycle

    }

0 个答案:

没有答案