Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
AnswerRe: counting Pin
Pete O'Hanlon24-Sep-08 2:22
mvePete O'Hanlon24-Sep-08 2:22 
JokeRe: counting Pin
Guffa24-Sep-08 2:31
Guffa24-Sep-08 2:31 
GeneralRe: counting Pin
PIEBALDconsult24-Sep-08 3:50
mvePIEBALDconsult24-Sep-08 3:50 
GeneralRe: counting Pin
Paul Conrad24-Sep-08 8:49
professionalPaul Conrad24-Sep-08 8:49 
Questionfinding width and height of glyphs using its indices Pin
GSSPriya24-Sep-08 0:27
GSSPriya24-Sep-08 0:27 
Questioncreate public folder on exchange 2003 Pin
panim2524-Sep-08 0:27
panim2524-Sep-08 0:27 
QuestionComboobx pulldown problem Pin
Denver Thomas23-Sep-08 23:59
Denver Thomas23-Sep-08 23:59 
AnswerRe: Comboobx pulldown problem Pin
nelsonpaixao24-Sep-08 14:14
nelsonpaixao24-Sep-08 14:14 
I think the way you handle your comboboxes coding are everthing but warm, cold or freezing instead Laugh | :laugh:

But (only) because your regards are warm, i´m going to post you this routine.
I assume you know display_member is like country_name(varchar) and value_member is like id_country(int), and you made a store_procedure to fill the combobox (select id_country,country_name FROM dbo.Countries)Big Grin | :-D

Good Warm LuckCool | :cool:

public static void ComboBox_Fill(ComboBox myComboBox,
string store_procedure, string display_member,
string value_member)
{
SqlConnection sql_conn = new SqlConnection(connection_string);
SqlCommand sql_cmd = new SqlCommand();
sql_cmd.Connection = sql_conn;
sql_cmd.CommandText = store_procedure;
sql_cmd.CommandType = CommandType.StoredProcedure;
sql_conn.Open();
SqlDataAdapter sql_da = new SqlDataAdapter();
sql_da.SelectCommand = sql_cmd;
DataTable dt = new DataTable();
sql_da.Fill(dt);
sql_conn.Close();
myComboBox.DataSource = dt;
myComboBox.DisplayMember = display_member;
myComboBox.ValueMember = value_member;
}


nelsonpaixao@yahoo.com.br

trying to help & get help

GeneralRe: Comboobx pulldown problem Pin
Denver Thomas24-Sep-08 21:13
Denver Thomas24-Sep-08 21:13 
QuestionHelp me with the excel file thingy Pin
newbieprogrammerguy23-Sep-08 23:57
newbieprogrammerguy23-Sep-08 23:57 
AnswerRe: Help me with the excel file thingy Pin
#realJSOP24-Sep-08 1:11
mve#realJSOP24-Sep-08 1:11 
QuestionHow to drag and drop a file into DataGridView? [modified] Pin
mimimimilaw23-Sep-08 23:35
mimimimilaw23-Sep-08 23:35 
AnswerRe: How to drag and drop a file into DataGridView? Pin
Giorgi Dalakishvili24-Sep-08 0:07
mentorGiorgi Dalakishvili24-Sep-08 0:07 
QuestionPrint in C# Pin
Laji5923-Sep-08 23:24
Laji5923-Sep-08 23:24 
QuestionHow to know shutdown using c#? Pin
lovnin23-Sep-08 23:23
lovnin23-Sep-08 23:23 
AnswerRe: How to know shutdown using c#? Pin
Simon P Stevens24-Sep-08 1:39
Simon P Stevens24-Sep-08 1:39 
QuestionUser Groups Management Implemenation for Desktop Application Question ? Pin
abmv23-Sep-08 23:05
professionalabmv23-Sep-08 23:05 
Questionwmi - registry Pin
arkiboys23-Sep-08 23:01
arkiboys23-Sep-08 23:01 
AnswerRe: wmi - registry Pin
Mark Salsbery24-Sep-08 8:17
Mark Salsbery24-Sep-08 8:17 
Questionviews don't appear in list of datamember Pin
Yasser Sobhdel23-Sep-08 22:04
Yasser Sobhdel23-Sep-08 22:04 
QuestionHow to work with Shortcut & Keyboard Pin
Laji5923-Sep-08 21:54
Laji5923-Sep-08 21:54 
AnswerRe: How to work with Shortcut & Keyboard Pin
Blue_Boy23-Sep-08 22:08
Blue_Boy23-Sep-08 22:08 
GeneralRe: How to work with Shortcut & Keyboard Pin
Laji5923-Sep-08 23:25
Laji5923-Sep-08 23:25 
GeneralRe: How to work with Shortcut & Keyboard Pin
Blue_Boy24-Sep-08 1:44
Blue_Boy24-Sep-08 1:44 
Question[Message Deleted] Pin
arkiboys23-Sep-08 21:50
arkiboys23-Sep-08 21:50 

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.