Combobox issue


Author
Message
fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
I have a table with 4 fields I need to write a maintenance form for:

PK int autoincrement

Category varchar(50)

ProcCode char(5)

Procedure varchar(50)

Unfortunately, this table is poorly designed but I can't change it.  The Category field is NOT unique and can in fact be the same for many rows.  I created a business object for this table along with a maintenance form with all the controls bound to an instance of the BO.  The Category control is a combobox with the dropdownstyle set to dropdown (the default).  I created a method in the BO to return a datatable of the distinct Category values in the table and used it to populate the combobox control.  The Display and Value Members of the combobox are both set to the Category field.  All rows display fine when I navigate through them but if I try to add or edit a row, the textbox portion of the combox control is not editable.  In other words, I must make a selection from the entries the the list portion of the control.  I need to have the user be able to enter a new category in the combobox control.  I thought the dropdownstyle = dropdown allowed this or am I missing something?

Thanks!!   

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hiya.

Yeah, I think that the dropdownstyle is correct. Have you also set the binding property to Text, instead of SelectedValue?

fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
I tried changing the BindingProperty to Text but the text portion of the control still remains "uneditable".
fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
I changed the PopulationType property to manual, declared, loaded and bound a BO to the combobox (cboCategory.DataSource = BO.CurrentTable) and set the comboboxes DisplayMember and ValueMember to the Category field in the BO.  The field values from the manually loaded BO show up in the list portion of the combobox fine but the text portion is still uneditable.  Arrrgh!! 
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Frank,

Do you have the DropDownSTyle of the combo set to DropDown instead of DropDownList?

fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
The DropDownStyle is set to DropDown which I believe should allow the text portion of the control to be editable.  In any event, I've tried all 3 styles and none of them allow editing in the text portion of the control.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The only other reason that it would not be editable is if the property is read-only.  Can you produce a sample that shows this behavior and post it?  I would like to see first hand what is going on.  Thanks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search