エラー
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の内容が表示されます。
しかし、レコードを表示するだけの通常の状態では、テキストエディットは何も表示しません。
はい、デバッガーはsecusernameが無効であることを示していますが、なぜですか?これを正しくするために私は何をすべきですか?