 |
| C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 13th, 2003, 02:48 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
comboBox & ReadOnly
Hi there!
plz tell me how can I Make comboBox ReadOnly! it has no readonly property! should I code for selectedIndexChanged() ???
Always:),
Hovik Melkomian.
__________________
Always,
Hovik Melkomian.
|
|

August 13th, 2003, 07:04 AM
|
|
Registered User
|
|
Join Date: Jul 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
set the DropDownStyle Property of Combobox to DropDownList
|
|

August 13th, 2003, 07:46 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
I meant to stop changing the selectedItem!
Always:),
Hovik Melkomian.
|
|

August 13th, 2003, 08:15 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Umm, if you don't want the user to be able to select from a list, why use a combo box at all?
|
|

August 13th, 2003, 08:28 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
I dont want the user changes it! being READONLY!!!!
Always:),
Hovik Melkomian.
|
|

August 13th, 2003, 08:39 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Yes I understand that, what I am saying is why are you bothering trying to work out how to make a combo box read only? You apparently don't need the functionality of a combo box (allowing a user to select from a list) so why bother using a combo box at all? Why not just display whatever it is you want to display in plain HTML, then it will definitely be read-only!
|
|

August 13th, 2003, 10:58 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
Im not have to discribe my all project to forum! we just ask our questions DEAR NEW FRIEND!!!
|
|

August 14th, 2003, 01:09 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Melvik
I think Desp has already solved your problem, just
go through what he is saying once more.
Regards
Ankur Verma
.Net and C++ Specialist
Wiley Tech Support
|
|

August 14th, 2003, 02:57 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
tnx for response but no dear it didnt what I was looking for!
This is my scenario:
I have a grid & some comboboxes & textBoxes witch all r binded to dataset! textBox has readonly & I set it to true & when user wanna edit the record & set the readonly to false & user can update & ...
so it is! but I cant do the same for combobox!!!
thats why I asked this question!:)
I hope I was clear.
Always:),
Hovik Melkomian.
|
|

August 15th, 2003, 03:45 AM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Melvik,
Maybe try Disabling the combo box.
The will prevent users making changes to it.
The default colour will change but this may be
OK for you.
James
|
|
 |