Hello,
Please let me know, how to show single column with text returned by ToString() method in dropdown list of LookUpEdit control. Currently, I can only bind properties to dropdown list columns. But, this doesn't work for me, because I don't have information about property names and I don't need to show them all.
Thx
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Mark,
You can obtain property names of a record of your data source via the PropetyDescriptor objects:
PropertyDescriptorCollection q = TypeDescriptor.GetProperties(typeof(<my busyness object type>)); if(q != null) foreach(PropertyDescriptor prop in q){ string pName = prop.Name; Console.WriteLine(pName); }
Please let us know if it makes sense.
Thank you,
Paul
Thanks, but I need to show text returned by ToString() method in dropdown list. For example, if I have different objects in my list (instances of different classes with different set of properties).
Please assist,
Thx
Hello Mark,
A possible solution is to declare a property that returns the result of the ToString() method call.
Thank you,
Paul
Unfortunately, I can't foresee which classes will be used in lookup. Is there any way to show custom column? Or may this functionality be added to the new version of the library?
Hello Mark,
After some investigation, I've found that it's possible to accomplish your task using the GridLookUpEdit, to provide record types, use an Unbound Column. I've attached a sample project to illustrate the solution.
Please let us know if it makes sense.
Thank you,
Paul
Thank you Paul!
It looks like it works for me.