Print Page | Close Window

[SOLVED] DevExpress ComboBoxEdit Control

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=496
Printed Date: 11-Jun-2026 at 4:35pm


Topic: [SOLVED] DevExpress ComboBoxEdit Control
Posted By: Linguinut
Subject: [SOLVED] DevExpress ComboBoxEdit Control
Date Posted: 15-Oct-2007 at 8:16am
Can this control be used with the ListConverterService?
 
[Edit]
I just noticed that I cannot select this type of control through the ControlBindingManager.  I can add a ComboBoxEdit control from the toolbox, then bind a property to the control from the ControlBindingManager.  So, in addition to the above question, why don't the controls appear in the ControlBindingManager?



Replies:
Posted By: Bill Jensen
Date Posted: 15-Oct-2007 at 9:36am
Originally posted by Linguinut

 
Can this control be used with the ListConverterService?
 
Sure.  The base ControlViewPresenter that gets the ListConverter doesn't care about the conrtol suite used to implement the view.
 
[Edit]
I just noticed that I cannot select this type of control through the ControlBindingManager.  I can add a ComboBoxEdit control from the toolbox, then bind a property to the control from the ControlBindingManager.  So, in addition to the above question, why don't the controls appear in the ControlBindingManager?
 
In the control binding manger, click Preferences and set the preferred control suite.
 


Posted By: Linguinut
Date Posted: 15-Oct-2007 at 10:16am

I thought that was the case...I just wanted to be sure.

As far as the CBM...I selected DevExpress v.7.2.1; however, I have 7.2.3 installed.  I am still not able to select the ComboBoxEdit control because it is not in the list.  I can add it manually then use the ExistingBindings tab to point the binding to the new control.  The control does not function as expected, though.  Only the index value is shown and the rest of the list is inaccessible.  Obviously, I am doing something wrong.


Posted By: Linguinut
Date Posted: 15-Oct-2007 at 10:26am
The ComboBoxEdit control doesn't seem to work, but the LookUpEdit control is a beauty!!  That guy works quite well.
 
I am scrapping the ComboBoxEdit control in favor of the LookUpEdit control. 
 
All is well (in this particular area!).


Posted By: orcities
Date Posted: 15-Oct-2007 at 11:37am
Are you trying to make an editable combo box. I have been unsuccessful.
 
 


Posted By: Linguinut
Date Posted: 15-Oct-2007 at 11:43am

Yup.  That little guy does not work (not sure why).  Swap it out with a LookUpEdit control and you may be jumping for joy.  It works almost the same as the ComboBoxEdit control, anyway.



Posted By: orcities
Date Posted: 15-Oct-2007 at 11:45am
I tried that but I ca only get it to do a lookup. I want it editable. Am I missing a setting? My ListConverter is set to Optional so...


Posted By: Linguinut
Date Posted: 15-Oct-2007 at 12:05pm
Interesting.  Let me see if I understand this correctly.  You have a list of items that are presented to the user.  Once picked the choice is persisted in the database (as text?  not foreign key?) with that new entity.  If the user chooses, he can enter his own item (or change one in the current list), then persist that value on the entity in the database.  Is the list supposed to be updated with the new entry, then?  If so, then the list would be dynamic...a user could add to it at will, right?


Posted By: orcities
Date Posted: 15-Oct-2007 at 12:21pm
They would only be able to add new information. Editing would only be allowed at page that the items were created.
 
In essence yes but with moderating.


Posted By: davidklitzke
Date Posted: 15-Oct-2007 at 2:24pm

DevForce does not allow ComboBoxEdit as a control for a ListConverter.  If you use the ComboBox Designer, you will see that the ComboBoxEdit is not one of the available controls indicating that it is not suitable.  You should use the LookUpEdit control instead,

If you want a ComboBox-style control that allows editing and insertion of objects in the list (which I think is what Dan wants), there is no available control today in DevForce that will provide this.  In particular, the ComboBox is hard-coded to use only the DropDownStyle.
 
However, if you are willing to use a CustomControl that is based on the ComboBox control and which supports insertion of new objects in the list, I do have a solution that shows you how to do this.


Posted By: orcities
Date Posted: 15-Oct-2007 at 2:28pm

Well don't keep it all to your self. lol



Posted By: davidklitzke
Date Posted: 15-Oct-2007 at 4:11pm

Look at a previous post I made:

http://www.ideablade.com/forum/forum_posts.asp?TID=271&KW=combobox - http://www.ideablade.com/forum/forum_posts.asp?TID=271&KW=combobox
 


Posted By: orcities
Date Posted: 16-Oct-2007 at 8:11am
Works great tx.



Print Page | Close Window