tags:

views:

1043

answers:

5

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

+1  A: 

Did you set the Properties->Columns values?

DevByDefault
yes i have selected to show the location field
helloise
and i still get editvalue is null in the lookupedit when i run my app..i have set the editvalue under the databindings property but also for some reason the show databingdings cehckbox on the control gets UNchecked everytime i run my app...
helloise
i see there is ANOTHER EditValue propery when you click on it you must choose a type, i choose string but what must i put in the value box????????? i have nothing in there...when i run my app now i dont get the {editvalue is null] anymore but there is still nothing in the lookupedit...
helloise
+2  A: 

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:

lookUpEdit1.Properties.DataSource = SocklocationBindingSource;
lookUpEdit1.Properties.DisplayMember = "Location";
lookUpEdit1.Properties.ValueMember = "Location";
lookUpEdit1.Properties.PopulateColumns();

(via Code or Designer)

najmeddine
+1  A: 

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.

JHappoldt
A: 

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.

Vikas
A: 

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