当行处于编辑模式时,文本框只显示内容!帮我纠正这个 [英] Textbox only displays content when the row is in edit mode! help me correct this please
本文介绍了当行处于编辑模式时,文本框只显示内容!帮我纠正这个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经做了一切我可以想到的事情,但是文本框只是不显示值
i have done every thing i can think of , but the textbox just doesnot display the values
请你纠正错误..
<dxg:GridColumn FieldName="secUserName" Header="TRAIL">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<StackPanel>
<TextBox Text="{Binding Path=Data.secUserName, Mode=TwoWay}" ></TextBox>
</StackPanel>
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
和vb
and in vb
'<!-- load the datagrid -->
Module1._Context.Load(Module1._Context.GetGESECsQuery())
GridControl1.AutoPopulateColumns = False
GridControl1.DataSource = Module1._Context.GESECs
推荐答案
我建议您使用我们的TextEdit而不是标准TextBox:
I suggest that you use our TextEdit instead of the standard TextBox:
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<StackPanel>
<TextEdit EditValue="{Binding Path=DataContext.secUserName}"></TextEdit>
</StackPanel>
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
如果没有帮助,请删除模板并确定网格有一列绑定到secUserName字段,它在运行时显示数据。
If this does not help, please remove the template and make certain that the grid has a column bound to the secUserName field and it shows data in runtime.
这篇关于当行处于编辑模式时,文本框只显示内容!帮我纠正这个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文