保留 DevExpress Xtragrid 单元格中输入的值
我在我的 C#.net Windows 应用程序中使用 DevExpress Xtragrid 控件。
我在网格的第一个单元格中输入一些值,如果我转到第二个单元格,第一个单元格中输入的值就会消失。
如何保留单元格中输入的值?
I am using DevExpress Xtragrid control in my C#.net windows application.
I enter some value into the first cell of the grid and if i go to second cell , the value entered in the first cell disappears.
How to retain the value entered in the cell ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您将其用于 gridView (Xtragrid) 中的未绑定列,第一步是确保转到列属性,并将
UnboundType
属性值更改为您想要的数据类型要进入该列,下面的示例使用double
。将
CustomUnboundColumnData
事件分配给您的 gridView。确保声明一个类级别变量(在下面的代码示例中名为 _userEnteredData)来保存您输入到 gridView 中的值,然后添加以下代码段,但请确保更改名称以匹配您的 gridView 和变量名称:类级别变量声明:
private double _userEnteredData = 0;
现在的事件:
我希望这会有所帮助。
您可以从这里获取更多详细信息:
http://documentation.devexpress.com/#WindowsForms/CustomDocument1477
I am assuming that you are using this for an unbound column in a gridView (Xtragrid), first step is make sure to go to the column properties, and change the
UnboundType
property value to the datatype that you will be entering into that column, example below usesdouble
.Assign the
CustomUnboundColumnData
event to your gridView. Make sure that you declare a class level variable (named _userEnteredData in code sample below) to hold the value that you are entering into your gridView, then add the following piece of code, but make sure that you change the names to match your gridView and variable names:Class level variable declaration:
private double _userEnteredData = 0;
Now the event:
I hope this helps.
You can get further details from here:
http://documentation.devexpress.com/#WindowsForms/CustomDocument1477
几种可能性:
希望这有帮助
Few possibilities:
Hope this helps