Click here to Skip to main content
15,914,016 members
Home / Discussions / C#
   

C#

 
QuestionRichTextBox problem Pin
cygnusx198615-Jun-07 22:56
cygnusx198615-Jun-07 22:56 
AnswerRe: RichTextBox problem Pin
giddy_guitarist16-Jun-07 7:56
giddy_guitarist16-Jun-07 7:56 
AnswerRe: RichTextBox problem Pin
Hesham Yassin20-Jun-07 0:24
Hesham Yassin20-Jun-07 0:24 
QuestionHow To Merge Columns in DataGridView ..? Pin
Pankaj - Joshi15-Jun-07 22:46
Pankaj - Joshi15-Jun-07 22:46 
AnswerRe: How To Merge Columns in DataGridView ..? [modified] Pin
mashisuke15-Jun-07 23:35
mashisuke15-Jun-07 23:35 
GeneralRe: How To Merge Columns in DataGridView ..? Pin
Pankaj - Joshi15-Jun-07 23:50
Pankaj - Joshi15-Jun-07 23:50 
GeneralRe: How To Merge Columns in DataGridView ..? Pin
Expert Coming16-Jun-07 0:46
Expert Coming16-Jun-07 0:46 
QuestionAssign Value in DropDownList type Combo Box Pin
Pankaj - Joshi15-Jun-07 22:25
Pankaj - Joshi15-Jun-07 22:25 
Hello All,
I Have combo which have it'd dropdown style = dropdownlist. i.e. no body can
enter the data in it. I add some values in it on the folrm load like ....

cmbQ.Items.Clear();
cmbQ.Items.Add("A");
cmbQ.Items.Add("B");
cmbQ.Items.Add("C");
cmbQ.SelectedIndex = 0;

that means After Form Load the displayed value in cmbQ = A. Right.

Now my Problem ...

If save the values in database using cmbQ.text that means either A,B or C it is save.

But suppose the saved value is C.

when user open form again in edit mode, I want to display the selected values in cmbQ should be C.


How I can Do that...?

Remeber I Don't use DisplayMember, ValueMember property bcoz the ABC values are hardcoded.
I just to show it.


I allready tried
SelectedText
SelectedIndex
Text
SelectedValue

But unable to get desire output...?


I also Change the dropdown style before assign the values like

cmbQ.DropDownStyle = ComboBoxStyle.Simple;
cmbQ.SelectedText = ObjDS.Tables["Version"].Rows[0]["Version"].ToString();
cmbQ.Refresh();
cmbQ.DropDownStyle = ComboBoxStyle.DropDownList;

But Unable To Get Desire Output.

Please Help Cry | :((






-- modified at 4:47 Saturday 16th June, 2007

Regards
Pankaj Joshi

AnswerRe: Assign Value in DropDownList type Combo Box Pin
Luc Pattyn15-Jun-07 22:50
sitebuilderLuc Pattyn15-Jun-07 22:50 
GeneralRe: Assign Value in DropDownList type Combo Box Pin
Pankaj - Joshi15-Jun-07 23:47
Pankaj - Joshi15-Jun-07 23:47 
QuestionHow we get User active status in Activ directory Pin
ASysSolvers15-Jun-07 22:18
ASysSolvers15-Jun-07 22:18 
QuestionHow to bring whole word to next line Pin
Hum Dum15-Jun-07 22:07
Hum Dum15-Jun-07 22:07 
AnswerRe: How to bring whole word to next line Pin
Vasudevan Deepak Kumar16-Jun-07 1:57
Vasudevan Deepak Kumar16-Jun-07 1:57 
AnswerRe: How to bring whole word to next line Pin
Hesham Yassin20-Jun-07 0:26
Hesham Yassin20-Jun-07 0:26 
QuestionGetting unhandled exception in runtime Pin
beatles169215-Jun-07 21:24
beatles169215-Jun-07 21:24 
AnswerRe: Getting unhandled exception in runtime Pin
Christian Graus15-Jun-07 22:01
protectorChristian Graus15-Jun-07 22:01 
GeneralRe: Getting unhandled exception in runtime Pin
beatles169215-Jun-07 22:22
beatles169215-Jun-07 22:22 
GeneralRe: Getting unhandled exception in runtime Pin
Colin Angus Mackay16-Jun-07 0:41
Colin Angus Mackay16-Jun-07 0:41 
GeneralRe: Getting unhandled exception in runtime Pin
beatles169216-Jun-07 0:59
beatles169216-Jun-07 0:59 
QuestionImagebutton click+datalist+c# Pin
razanabanu15-Jun-07 20:53
razanabanu15-Jun-07 20:53 
AnswerRe: Imagebutton click+datalist+c# Pin
Christian Graus15-Jun-07 21:14
protectorChristian Graus15-Jun-07 21:14 
QuestionProblem with quicktime component (System.AccessViolationException) Pin
combo_ci15-Jun-07 20:48
combo_ci15-Jun-07 20:48 
AnswerRe: Problem with quicktime component (System.AccessViolationException) Pin
combo_ci15-Jun-07 23:25
combo_ci15-Jun-07 23:25 
QuestionTimeSpan Pin
Ian Uy15-Jun-07 19:13
Ian Uy15-Jun-07 19:13 
AnswerRe: TimeSpan Pin
Ravi Bhavnani15-Jun-07 19:26
professionalRavi Bhavnani15-Jun-07 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.