当我更改另一个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
}