努力填充查找编辑问题!
我正在使用 devexpress Lookupedit 控件,并且设置了 EditValue 属性(SocklocationBindingSource - Location)。当您单击控件本身上的黑色小箭头时,将设置数据源、显示成员和值成员。我运行我的应用程序并在实际控件中看到 [editvalue is null]?
我还必须设置什么? 我到底做错了什么?
我用的是VS 2009
I am using the devexpress lookupedit control, and I have set the EditValue property(SocklocationBindingSource - Location). When you click on the black little arrow ON the control itself, the datasource, displaymember and valumember are set. I run my app and see [editvalue is null] in the actual control?
What else must i set?
What on earth am i doing wrong?
I use VS 2009
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您是否尝试通过数据源中的所有位置填充
lookUpEdit
+ 使 EditValue 占据所选位置?如果是这样,您可以执行以下操作:(通过代码或设计器)
Are you trying to populate the
lookUpEdit
by all locations in the datasource + make EditValue take the selected location?, if so you can do this:(via Code or Designer)
您没有做错任何事,LookUpEdit 控件默认没有 EditValue。考虑将 EditValue 属性数据绑定到对象。如果您已经这样做了,那么您可以设置默认编辑值以使编辑器正常工作。
此外,可以在 Properties.NullText 中更改“EditValue is Null”风格文本。
You are not doing anything wrong, the LookUpEdit control does not have an EditValue by default. Consider data binding the EditValue property to an object. If you have already done this then you could set a default edit value to get the editor to function.
Also, the 'EditValue is Null' flavor text can be changed in Properties.NullText.
您是否设置了“属性”->“列”值?
Did you set the Properties->Columns values?
我遇到了你描述的同样的问题,但这取决于你如何使用数据,你正在使用什么数据结构,你正在使用的事件等等......
这对我有用:
http://www.devexpress.com/Support/Center/p/Q350641.aspx
I had the same problem you described, but it depends on how you are using the data, what data structures you are using, the events you are using, etc...
Here's what worked for me:
http://www.devexpress.com/Support/Center/p/Q350641.aspx
您必须将 SocklocationBindingSource 与正确的数据源(例如 IList 或 Datatable)绑定。
例如:
SocklocationBindingSource.DataSource = MyBiz.GetAllObjs();
当DataSource为null时,显示[editvalue is null]。您可以在属性中更改此设置。
You must bind the SocklocationBindingSource with a proper data source such as an IList or Datatable.
ex:
SocklocationBindingSource.DataSource = MyBiz.GetAllObjs();
[editvalue is null] is displayed when the DataSource is null. You can change this in properties.
您应该检查 DisplayMember 和 ValueMember 属性的定义。在此处查看示例: http://itjungles.com /devexpress/如何轻松填充-devexpress-lookupedit-in-c
Definition you should check the DisplayMember and ValueMember property. View an example here: http://itjungles.com/devexpress/how-to-easily-populate-devexpress-lookupedit-in-c