Click here to Skip to main content
15,904,348 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serialport from a remote server Pin
Dave Kreskowiak14-Jul-10 6:39
mveDave Kreskowiak14-Jul-10 6:39 
QuestionData Types from Datareader Pin
Unsy13-Jul-10 23:20
Unsy13-Jul-10 23:20 
AnswerRe: Data Types from Datareader Pin
Prosanta Kundu online13-Jul-10 23:37
Prosanta Kundu online13-Jul-10 23:37 
AnswerRe: Data Types from Datareader Pin
Peace ON13-Jul-10 23:47
Peace ON13-Jul-10 23:47 
AnswerRe: Data Types from Datareader Pin
riced14-Jul-10 0:10
riced14-Jul-10 0:10 
QuestionListbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
norjali13-Jul-10 22:44
norjali13-Jul-10 22:44 
AnswerRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
Luc Pattyn13-Jul-10 22:52
sitebuilderLuc Pattyn13-Jul-10 22:52 
GeneralRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
norjali13-Jul-10 22:58
norjali13-Jul-10 22:58 
Luc Pattyn wrote:
The ListBox will not keep track of your selection order; all it keeps track of is the selected state for each of the items; as a result SelectedItems will enumerate the selected items in their order of appearance.

You need to implement your stuff yourself; just keep your own chronological list of selected items, wire up the SelectionChanged event, and adapt your list accordingly every time the selection changes; remember an item can be removed from the selection too!


thanks for the reply. I tried to keep a list of selected items, but listbox1.selecteditem wont return the current selected item (ie lets say i selected '3' and then '1' and then '2', then listbox.selecteditem will always return '1' cause its the first in order)
AnswerRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
Luc Pattyn13-Jul-10 23:10
sitebuilderLuc Pattyn13-Jul-10 23:10 
GeneralRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
norjali14-Jul-10 16:33
norjali14-Jul-10 16:33 
QuestionRegular Expressions Performance Pin
yftah198913-Jul-10 22:17
yftah198913-Jul-10 22:17 
AnswerRe: Regular Expressions Performance Pin
Pete O'Hanlon13-Jul-10 22:26
mvePete O'Hanlon13-Jul-10 22:26 
AnswerRe: Regular Expressions Performance Pin
Luc Pattyn13-Jul-10 22:47
sitebuilderLuc Pattyn13-Jul-10 22:47 
AnswerRe: Regular Expressions Performance Pin
riced14-Jul-10 0:15
riced14-Jul-10 0:15 
QuestionLogging to Website Pin
NaveenHS13-Jul-10 21:13
NaveenHS13-Jul-10 21:13 
AnswerRe: Logging to Website Pin
Peace ON13-Jul-10 21:27
Peace ON13-Jul-10 21:27 
GeneralRe: Logging to Website Pin
NaveenHS13-Jul-10 21:38
NaveenHS13-Jul-10 21:38 
GeneralRe: Logging to Website Pin
karmjit43513-Jul-10 21:48
karmjit43513-Jul-10 21:48 
AnswerRe: Logging to Website Pin
Luc Pattyn13-Jul-10 21:43
sitebuilderLuc Pattyn13-Jul-10 21:43 
AnswerRe: Logging to Website Pin
Bigdeak13-Jul-10 22:02
Bigdeak13-Jul-10 22:02 
QuestionNeed Help Pin
mjawadkhatri13-Jul-10 20:21
mjawadkhatri13-Jul-10 20:21 
AnswerRe: Need Help Pin
OkkiePepernoot13-Jul-10 21:09
OkkiePepernoot13-Jul-10 21:09 
AnswerRe: Need Help Pin
karmjit43513-Jul-10 21:15
karmjit43513-Jul-10 21:15 
AnswerRe: Need Help Pin
OriginalGriff13-Jul-10 21:40
mveOriginalGriff13-Jul-10 21:40 
AnswerRe: Need Help Pin
Luc Pattyn13-Jul-10 21:49
sitebuilderLuc Pattyn13-Jul-10 21:49 

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.