Wpf 在GridControl中为单元格启用就地编辑

Wpf 在GridControl中为单元格启用就地编辑,wpf,devexpress,gridcontrol,Wpf,Devexpress,Gridcontrol,我想为GridControl中的单元格启用就地编辑。我已经在TableView和Columns上设置了属性AllowEditing,但双击单元格后仍无法编辑单元格中的数据。上下文菜单中仅启用“复制”。我没能找到解决办法 TableView中的NavigationStyle属性设置为“单元格” 我的xaml 编辑 ViewModel和ListSource类 public类MainWindowViewModel:ObserveObject { 公共主窗口视图模型() { } 私有绑定列表test

我想为GridControl中的单元格启用就地编辑。我已经在TableView和Columns上设置了属性AllowEditing,但双击单元格后仍无法编辑单元格中的数据。上下文菜单中仅启用“复制”。我没能找到解决办法

TableView中的NavigationStyle属性设置为“单元格”

我的xaml


编辑

ViewModel和ListSource类

public类MainWindowViewModel:ObserveObject
{
公共主窗口视图模型()
{
}
私有绑定列表testCollection;
公共绑定列表TestCollection
{
收到
{
var result=this.testCollection;
if(null==结果)
{
锁(这个)
{
结果=this.testCollection;
if(null==结果)
{
结果=新建绑定列表();
对于(int i=0;i<1000000;i++)
{
添加(newtestclass(){Property1=“test”+i,Number=i%20});
}
this.testCollection=结果;
}
}
}
返回结果;
}
}
公共IListSource TestCollectionSource
{
获取{returnnewlistsource(()=>this.TestCollection);}
}
}
公共类ListSource:IListSource
{
公共只读Func innerListProvider;
公共ListSource(Func innerListProvider)
{
this.innerListProvider=innerListProvider;
}
公共IList GetList()
{
返回这个.innerListProvider();
}
公共bool ContainsListCollection
{
获取{return false;}
}
}
公共类TestClass:ObservableObject
{
私有字符串属性1;
公共字符串属性1
{
获取{返回this.property1;}
设置
{
此参数为1.property1=值;
RaisePropertyChanged(()=>this.Property1);
}
}
私有整数;
公共整数
{
获取{返回this.number;}
设置
{
这个数字=数值;
RaisePropertyChanged(()=>此.Number);
}
}
}
我已从develxpress支持部门获得了一份电子邮件

PLINKINSTANTFEEDBACKDataSource是只读数据源。如果希望直接在网格中编辑数据,请将源集合绑定到GridControl.ItemsSource属性,而不使用即时反馈数据提供程序


GridControl是自定义DataGrid吗?@AmitRaz GridControl是来自devexpress的wpf库的DataGrid。您的
TestCollectionSource
是什么?你能提供代码吗?@nempoBu4是的。请参见编辑。这真的很简单。我的xaml是主窗口。我已经提供了我创建的MainWindowViewModel和ListSource类。您还可以为
TestClass
添加代码吗?