DevExpress XtraGrid问题设置值
我想知道是否有人可以帮忙。
我在 Devexpress Xtragrid 中有一个 LookupEdit,它由文件名列表以及一个空选项和一个“新”选项填充。
如果用户选择“新”选项,它将转到上传表单(这很好),上传到新目录并返回到表单。
问题是我想将表单设置为新值,但我无法让它工作。
在查找编辑的 EditValueChanging 中,我重新填充查找,然后使用 GetKeyValueByDisplayText,但由于某种原因返回的值为 null。然而,我已经为 uploadfile 定义了一个对象,其属性为 Filename,并将 displaymember 和 valuemember 设置为 Filename。
如果有人可以提供帮助,因为我已经用尽了我的选择。
I wonder if someone can help.
I have a LookupEdit within a Devexpress Xtragrid which is populated from a list of filenames, as well as an empty option, and a "new" option.
If the user selects the "new" option, it goes off to an upload form (which is fine), uploads to the new directory and returns to the form.
The problem is that I want to set the form to the new value, but I can't get it to work.
In the EditValueChanging for the lookupedit, I repopulate the lookup and then use GetKeyValueByDisplayText, but the value returned is null for some reason. Yet I've defined an object for uploadfile with a property of Filename and set both the displaymember and valuemember to Filename.
If anyone can help, as I've exhausted my options.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出现该问题的原因可能是编辑器尚未加载新列表。请尝试调用该
方法。这对你有用吗?
The problem might appear because the new list hasn't been loaded by the editor yet. Please try to call the
method. Does this work for you?