错误
System.Windows.Data Error: BindingExpression path error: 'secUserName' property not found on 'DevExpress.Xpf.Grid.EditGridCellData' 'DevExpress.Xpf.Grid.EditGridCellData' (HashCode=2852273). BindingExpression: Path='secUserName' DataItem='DevExpress.Xpf.Grid.EditGridCellData' (HashCode=2852273); target element is 'DevExpress.Xpf.Editors.TextEdit' (Name=''); target property is 'EditValue' (type 'System.Object')..
System.Windows.Data Error: BindingExpression path error: 'secUserName' property not found on 'DevExpress.Xpf.Editors.TextEdit' 'DevExpress.Xpf.Editors.TextEdit' (HashCode=19675928). BindingExpression: Path='secUserName' DataItem='DevExpress.Xpf.Grid.EditGridCellData' (HashCode=2852273); target element is 'DevExpress.Xpf.Editors.TextEdit' (Name=''); target property is 'EditValue' (type 'System.Object')..
vb.net
Public Sub New()
InitializeComponent()
Me.Title = ApplicationStrings.HomePageTitle
'<!-- load the datagrid -->
Module1._Context.Load(Module1._Context.GetGESECsQuery())
GridControl1.DataSource = Module1._Context.GESECs
GridControl1.DataContext = Module1._Context.GESECs
End Sub
XAML
<dxg:GridColumn Header="TRAIL" FieldName="secUserName" >
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<StackPanel>
<dxe:TextEdit EditValue="{Binding Path=secUserName}"></dxe:TextEdit>
</StackPanel>
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
</dxg:GridColumn>
问题
单击编辑文本时(通过将行置于编辑模式{侧面有铅笔图}),将显示 SECUSERNAME 的内容
但在只显示记录的正常情况下,textedit 不显示任何内容。
是的,调试器显示 secusername 无效,但为什么呢?我应该怎么做才能做到这一点?