DevExpress XtraGrid problem setting value
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 GetKeyValueByDi开发者_JAVA技巧splayText, 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.
The problem might appear because the new list hasn't been loaded by the editor yet. Please try to call the
(gridView.ActiveEditor as LookupEdit).Properties.ForceInitialize();
method. Does this work for you?
精彩评论