Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server ADO.NET , +
Hi All,
 
I need to display default values in combo and text boxes from database whenever form load event happens.
 
Employee table
  EmpID
  EName
  ESalary
  EDept
Employee table data
  001 John 1000 Sales
  002 Tony 2000 Production
  003 Troy 3000 Marketing
 
I need to display Ename, ESalary and Edept data in combo box with default name: John, default Esalary: 1000 and default Edept Sales.
 
I have design form in studio 2010 using VB.Net where Ename, Esalary and Edept are in labels and for John, 1000 and Sales I have combo box like below:
Lables:         Combo box
Ename:          John (Default)
ESalary:        1000 (Default)
EDept:          Sales (Default)
My Question is:
How would I display above mentioned default values in combo box followed by other data when form load event happens?
(If I need to pick other values in Ename, ESalary or Edept I can pick from Combo box otherwise by default It will pop up only John, 1000 and Sales.
 
I am sorry If I am not able to explain it in proper way.
 
I would appreciate any help into this. Thanks a lot in advance Smile | :)
Posted 4-Dec-12 4:00am
Joy1979317
Edited 4-Dec-12 4:09am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 320
1 DamithSL 265
2 CPallini 235
3 Maciej Los 190
4 Sergey Alexandrovich Kryukov 184
0 OriginalGriff 5,415
1 DamithSL 4,422
2 Maciej Los 3,820
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,911


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100