你好!
问题已解决:
private void _flex_PrepareCellForEdit(object sender, CellEditEventArgs e)
{
DependencyObject obj = e.Editor as DependencyObject;
if (null == e.Editor)
{
return;
}
List<System.Windows.Controls.ComboBox> cmbLt = FindVisualChild<System.Windows.Controls.ComboBox>(obj);
foreach (var cmb in cmbLt)
{
cmb.SetBinding(System.Windows.Controls.ComboBox.ItemsSourceProperty, new Binding()
{
Path = new PropertyPath("Categories"),
Source = this.Resources["_vm"],
});
}
}
|