Click here to Skip to main content
15,917,618 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to swap values in database with the help of combobox Pin
Akhilesh Yadav2-Nov-06 23:25
Akhilesh Yadav2-Nov-06 23:25 
AnswerRe: How to swap values in database with the help of combobox Pin
OldWarhorse3-Nov-06 3:09
OldWarhorse3-Nov-06 3:09 
Questionformat a time to 24 hours [modified] Pin
steve_rm2-Nov-06 22:19
steve_rm2-Nov-06 22:19 
AnswerRe: format a time to 24 hours Pin
Steven J Jowett2-Nov-06 22:30
Steven J Jowett2-Nov-06 22:30 
GeneralRe: format a time to 24 hours Pin
steve_rm2-Nov-06 23:22
steve_rm2-Nov-06 23:22 
QuestionSwaping Pin
Khan.Bangash2-Nov-06 22:00
Khan.Bangash2-Nov-06 22:00 
QuestionRe: Swaping Pin
Dave Sexton3-Nov-06 0:56
Dave Sexton3-Nov-06 0:56 
AnswerRe: Swaping Pin
OldWarhorse3-Nov-06 3:08
OldWarhorse3-Nov-06 3:08 
Safecom wrote:
I m using combobox to get values from database.


No, you are using a DataProvider to get values from the database.
Those values are provided to you in a stream.
You can put those values into various containers, eg. a DataTable, an Array of List Objects, etc. which can then be fed or bound to your control.

They should be encapsulated in a list of business objects, (preferably using a list type that implements IList - ArrayList is good) which is then manipulated (sorted according to your business rules, which may change momentarily by user gestures such as clicking radio buttons, checkboxes, etc.) and then presented to the user in the ComboBox. You may need to add a suitable sort key to your business object to help with the re-sorting/swapping.

You can do all that off the DropDown event if necessary, but you will take a performance hit. It would be better to evaluate your conditions beforehand if possible, using other control events, and re-sort the list (and rebind the list to the control) before the user drops it down.

SelectedIndexChange is too late. The user has already seen the list.
QuestionImport C# DLL into vb.net Pin
charchabil032-Nov-06 21:01
charchabil032-Nov-06 21:01 
AnswerRe: Import C# DLL into vb.net Pin
GaryWoodfine 3-Nov-06 0:16
professionalGaryWoodfine 3-Nov-06 0:16 
AnswerRe: Import C# DLL into vb.net Pin
OldWarhorse3-Nov-06 2:18
OldWarhorse3-Nov-06 2:18 
AnswerRe: Import C# DLL into vb.net Pin
Dave Kreskowiak3-Nov-06 6:38
mveDave Kreskowiak3-Nov-06 6:38 
Questionfile transfer in lan Pin
helpmepls2-Nov-06 20:20
helpmepls2-Nov-06 20:20 
AnswerRe: file transfer in lan Pin
nlarson113-Nov-06 4:06
nlarson113-Nov-06 4:06 
QuestionImageCompression Pin
sheema1232-Nov-06 19:58
sheema1232-Nov-06 19:58 
AnswerRe: ImageCompression Pin
Reuven Elliassi2-Nov-06 21:44
Reuven Elliassi2-Nov-06 21:44 
QuestionRot-13 Pin
UltraCoder2-Nov-06 16:56
UltraCoder2-Nov-06 16:56 
AnswerRe: Rot-13 Pin
Reuven Elliassi2-Nov-06 21:52
Reuven Elliassi2-Nov-06 21:52 
GeneralRe: Rot-13 Pin
UltraCoder3-Nov-06 14:00
UltraCoder3-Nov-06 14:00 
AnswerRe: Rot-13 Pin
Reuven Elliassi3-Nov-06 20:25
Reuven Elliassi3-Nov-06 20:25 
AnswerRe: Rot-13 Pin
ChandraRam3-Nov-06 2:26
ChandraRam3-Nov-06 2:26 
GeneralRe: Rot-13 Pin
UltraCoder3-Nov-06 14:03
UltraCoder3-Nov-06 14:03 
GeneralRe: Rot-13 Pin
ChandraRam3-Nov-06 19:34
ChandraRam3-Nov-06 19:34 
QuestionWeb browser project memory leaking Pin
my_btr2-Nov-06 16:48
my_btr2-Nov-06 16:48 
AnswerRe: Web browser project memory leaking Pin
Dave Kreskowiak3-Nov-06 1:35
mveDave Kreskowiak3-Nov-06 1:35 

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.