Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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
 
Old August 13th, 2003, 02:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default 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.
 
Old August 13th, 2003, 07:04 AM
Registered User
 
Join Date: Jul 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
set the DropDownStyle Property of Combobox to DropDownList


 
Old August 13th, 2003, 07:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

I meant to stop changing the selectedItem!

Always:),
Hovik Melkomian.
 
Old August 13th, 2003, 08:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Umm, if you don't want the user to be able to select from a list, why use a combo box at all?
 
Old August 13th, 2003, 08:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

I dont want the user changes it! being READONLY!!!!

Always:),
Hovik Melkomian.
 
Old August 13th, 2003, 08:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

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!
 
Old August 13th, 2003, 10:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Im not have to discribe my all project to forum! we just ask our questions DEAR NEW FRIEND!!!
 
Old August 14th, 2003, 01:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

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
 
Old August 14th, 2003, 02:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

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.
 
Old August 15th, 2003, 03:45 AM
Authorized User
 
Join Date: Aug 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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







Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagridview & combobox column p2pmarit .NET Framework 2.0 1 July 31st, 2006 02:31 AM
ComboBox & ListBox usage venkikrao VB.NET 4 March 14th, 2006 07:50 AM
comboBox & ReadOnly melvik C# 2 October 29th, 2003 12:45 AM
ComboBox & related info melvik C# 2 July 5th, 2003 04:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.