Click here to Skip to main content
15,919,245 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I open a hyperlink in a link click from my form in C#.net Pin
Thomas Stockwell30-Jun-08 4:51
professionalThomas Stockwell30-Jun-08 4:51 
QuestionGridviw - my rowCommand does not run Pin
simsen30-Jun-08 0:42
simsen30-Jun-08 0:42 
AnswerRe: Gridviw - my rowCommand does not run Pin
simsen30-Jun-08 0:54
simsen30-Jun-08 0:54 
QuestionSystem.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
ozzox30-Jun-08 0:37
ozzox30-Jun-08 0:37 
AnswerRe: System.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
Daniel Grunwald30-Jun-08 2:24
Daniel Grunwald30-Jun-08 2:24 
GeneralRe: System.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
ozzox30-Jun-08 15:43
ozzox30-Jun-08 15:43 
AnswerRe: System.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
leppie30-Jun-08 5:10
leppie30-Jun-08 5:10 
QuestionWeird data bindings issue Pin
Harvey Saayman30-Jun-08 0:22
Harvey Saayman30-Jun-08 0:22 
hey guys...

on a form ive got 5 comboBoxes, they should all have the same data bound to them & this is how i do it

private void dataBindTimeCatComboBoxes()
{
    //create a new dataset 
    DataSet dataSet = new DataSet();

    //create sql command
    SqlCommand selectCommand = new SqlCommand("Proc_SelectTimeCategoryName", sqlConn);
    selectCommand.CommandType = CommandType.StoredProcedure;

    //create data adapter
    SqlDataAdapter dataAdapter = new SqlDataAdapter();
    dataAdapter.SelectCommand = selectCommand;
    //Fill the dataset
    dataAdapter.Fill(dataSet, "tCat");

    DataTable tCatTable = dataSet.Tables["tCat"];


    //
    // Data Bind the combo boxes
    //
    comboBox2.DataSource = tCatTable;
    comboBox2.DisplayMember  = "TCat_Name_VC30";
    comboBox2.ValueMember = "TCat_ID_SI";

    comboBox3.DataSource = tCatTable;
    comboBox3.DisplayMember = "TCat_Name_VC30";
    comboBox3.ValueMember = "TCat_ID_SI";

    comboBox4.DataSource = tCatTable;
    comboBox4.DisplayMember = "TCat_Name_VC30";
    comboBox4.ValueMember = "TCat_ID_SI";

    comboBox5.DataSource = tCatTable;
    comboBox5.DisplayMember = "TCat_Name_VC30";
    comboBox5.ValueMember = "TCat_ID_SI";

    comboBox6.DataSource = tCatTable;
    comboBox6.DisplayMember = "TCat_Name_VC30";
    comboBox6.ValueMember = "TCat_ID_SI";
}


the data does get bound, but the weird part is when i select a value in any one of the combo boxes ALL the combo boxes selected items change to that...

any ideas as to why? i really dont feel like making separate data sources for each one, it'll be redundant cuz all the combos have the same data.... but them sharing the same data source is the only reason that i can see for this strange behavior.

thanx

Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL

you.suck = (you.passion != Programming)

AnswerRe: Weird data bindings issue Pin
Vimalsoft(Pty) Ltd30-Jun-08 0:58
professionalVimalsoft(Pty) Ltd30-Jun-08 0:58 
AnswerRe: Weird data bindings issue Pin
Mbah Dhaim30-Jun-08 1:11
Mbah Dhaim30-Jun-08 1:11 
GeneralRe: Weird data bindings issue Pin
Harvey Saayman30-Jun-08 1:14
Harvey Saayman30-Jun-08 1:14 
QuestioncheckBox & ListView Pin
laziale30-Jun-08 0:20
laziale30-Jun-08 0:20 
AnswerRe: checkBox & ListView Pin
Vimalsoft(Pty) Ltd30-Jun-08 1:00
professionalVimalsoft(Pty) Ltd30-Jun-08 1:00 
GeneralRe: checkBox & ListView Pin
laziale30-Jun-08 1:19
laziale30-Jun-08 1:19 
QuestionDetermine incorrect String.Format format Pin
Stevo Z29-Jun-08 23:59
Stevo Z29-Jun-08 23:59 
AnswerRe: Determine incorrect String.Format format Pin
PIEBALDconsult30-Jun-08 5:10
mvePIEBALDconsult30-Jun-08 5:10 
QuestionSQL connection execute what? Pin
laziale29-Jun-08 23:13
laziale29-Jun-08 23:13 
AnswerRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:22
protectorChristian Graus29-Jun-08 23:22 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:28
laziale29-Jun-08 23:28 
GeneralRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:36
protectorChristian Graus29-Jun-08 23:36 
AnswerRe: SQL connection execute what? Pin
Mbah Dhaim29-Jun-08 23:27
Mbah Dhaim29-Jun-08 23:27 
GeneralRe: SQL connection execute what? Pin
Colin Angus Mackay29-Jun-08 23:31
Colin Angus Mackay29-Jun-08 23:31 
JokeRe: SQL connection execute what? Pin
Mbah Dhaim29-Jun-08 23:37
Mbah Dhaim29-Jun-08 23:37 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:34
laziale29-Jun-08 23:34 
GeneralRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:39
protectorChristian Graus29-Jun-08 23:39 

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.