|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2010-06-16 15:06:55
Posts: 8,
Visits: 30
|
|
Hi
I've tried to follow http://edn.embarcadero.com/print/33816. But all I end up with is a locked combobox with the text: [EditValue is null]
I've made sure that the column expression is set to self.field and not self.field.AsString
Any ideas how to fix this? 
--
Kind Regards
Michael
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 2010-07-12 15:25:48
Posts: 16,
Visits: 158
|
|
It should be LookUpEdit and not ComboBox. DevExpress ComboBox does not support data binding. With LookUpEdit, you will need separate ExpressionHandle with Field.allInstances as Expression and set AddSelfColumn property to True. Then you need to set the ValueMember to "self" and DisplayMember to whatever attribute of the "Field" class. Then in XtraGrid's ExpressionHandle, you need to add column with self.Field in the column's collection. It should work.
Thanks & Regards,
Sachin
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2010-06-16 15:06:55
Posts: 8,
Visits: 30
|
|
Hi
Thx for the reply.
Combobox was a poor word choice It's ofc a locked LookUpEdit
I've done what you've suggested, but I'm still only getting the before mentioned text :/
--
Kind Regards
Michael
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2010-06-16 15:06:55
Posts: 8,
Visits: 30
|
|
Hi again
I just made a sample project that show my problem
--
Kind Regards
Michael
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 2010-06-26 12:18:19
Posts: 18,
Visits: 199
|
|
Hi Michael,
In your example the "colCategory" column is marked as readonly for some reason (colCategory.OptionsColumn.ReadOnly = true). That's why it's freezed.
I also removed the unneeded "self" column from the category lookup editor by doing so: I opened repositoryItemLookUpEdit1.Columns collection editor and pressed "Populate Columns" button. It added two columns from the data source (expression handle), then I simply removed the unneeded one ("self"). Note that when repositoryItemLookUpEdit1.Columns was empty it silently added all (two) columns from the data source.
See the modified project attached.
Regards,
--
Oleg Zhukov
|
|
|
|