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

C#

 
QuestionProblem Here how can i deal [modified] Pin
Pellatrex11-Jun-10 2:14
Pellatrex11-Jun-10 2:14 
AnswerRe: Problem Here how can i deal Pin
Richard MacCutchan11-Jun-10 2:55
mveRichard MacCutchan11-Jun-10 2:55 
AnswerRe: Problem Here how can i deal Pin
R. Giskard Reventlov11-Jun-10 2:55
R. Giskard Reventlov11-Jun-10 2:55 
AnswerRe: Problem Here how can i deal Pin
Peace ON11-Jun-10 2:56
Peace ON11-Jun-10 2:56 
AnswerRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 3:00
sitebuilderLuc Pattyn11-Jun-10 3:00 
AnswerRe: Problem Here how can i deal Pin
harold aptroot11-Jun-10 3:00
harold aptroot11-Jun-10 3:00 
GeneralRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 3:47
sitebuilderLuc Pattyn11-Jun-10 3:47 
AnswerRe: Problem Here how can i deal Pin
riced11-Jun-10 4:29
riced11-Jun-10 4:29 
GeneralRe: Problem Here how can i deal Pin
Eddy Vluggen11-Jun-10 5:10
professionalEddy Vluggen11-Jun-10 5:10 
GeneralRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 5:25
sitebuilderLuc Pattyn11-Jun-10 5:25 
AnswerRe: Problem Here how can i deal Pin
i.j.russell12-Jun-10 0:03
i.j.russell12-Jun-10 0:03 
QuestionCombobox problem Pin
Hum Dum10-Jun-10 23:02
Hum Dum10-Jun-10 23:02 
AnswerRe: Combobox problem Pin
ddecoy11-Jun-10 1:15
ddecoy11-Jun-10 1:15 
GeneralRe: Combobox problem Pin
Hum Dum11-Jun-10 1:58
Hum Dum11-Jun-10 1:58 
AnswerRe: Combobox problem Pin
Luc Pattyn11-Jun-10 1:21
sitebuilderLuc Pattyn11-Jun-10 1:21 
GeneralRe: Combobox problem Pin
ddecoy11-Jun-10 1:41
ddecoy11-Jun-10 1:41 
GeneralRe: Combobox problem Pin
Luc Pattyn11-Jun-10 1:59
sitebuilderLuc Pattyn11-Jun-10 1:59 
GeneralRe: Combobox problem Pin
Hum Dum11-Jun-10 2:27
Hum Dum11-Jun-10 2:27 
GeneralRe: Combobox problem [modified] Pin
Luc Pattyn11-Jun-10 2:45
sitebuilderLuc Pattyn11-Jun-10 2:45 
1.
The hint is in the documentation:
"SelectedText gets or sets the text that is selected in the editable portion of a ComboBox".

A ComboBox allows you to choose one item from a list; doing so will fire some events and set some properties, in particular SelectedIndex and SelectedValue. These apply to you point-and-clicking in the list.

It also often allows you to type a text yourself; if so, you can edit the text, select part of it, copy, cut, paste, etc. There SelectedText works like it does in a TextBox. That is unrelated to point-and-clicking in the list.

When you do point and click, the TextBox part will reflect what you have selected, and under some conditions, it will also select it (turning it white on blue), at that time SelectedText would become equal to SelectedValue.

Hence: use SelectedIndex for retrieving the index inside a SelectedIndexChanged handler.

2.

Hum Dum wrote:
foreach (DataTable dt in dsTemp)


does not work when dsTemp is a DataSet. A DataSet holds tables but does not enumerate them automatically.
However
foreach (DataTable dt in dsTemp.Tables)

should work for you.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

modified on Friday, June 11, 2010 8:51 AM

GeneralRe: Combobox problem Pin
Hum Dum13-Jun-10 17:41
Hum Dum13-Jun-10 17:41 
GeneralRe: Combobox problem Pin
Luc Pattyn13-Jun-10 18:05
sitebuilderLuc Pattyn13-Jun-10 18:05 
QuestionDisconnect SSL connection after user has logout Pin
tiffanygct10-Jun-10 22:20
tiffanygct10-Jun-10 22:20 
QuestionHow do I find the BITMAPINFOHEADER of a image Pin
TimSWatson10-Jun-10 21:49
TimSWatson10-Jun-10 21:49 
AnswerRe: How do I find the BITMAPINFOHEADER of a image Pin
Henry Minute11-Jun-10 6:11
Henry Minute11-Jun-10 6:11 
GeneralRe: How do I find the BITMAPINFOHEADER of a image Pin
TimSWatson13-Jun-10 21:51
TimSWatson13-Jun-10 21:51 

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.