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

C#

 
GeneralRe: Strong/Shared assemblies Pin
Kant19-Mar-04 10:36
Kant19-Mar-04 10:36 
GeneralRe: Strong/Shared assemblies Pin
Heath Stewart21-Mar-04 12:52
protectorHeath Stewart21-Mar-04 12:52 
GeneralLoading assemblies Pin
Craig G. Wilson19-Mar-04 4:55
Craig G. Wilson19-Mar-04 4:55 
GeneralRe: Loading assemblies Pin
Heath Stewart19-Mar-04 5:56
protectorHeath Stewart19-Mar-04 5:56 
GeneralRe: Loading assemblies Pin
Craig G. Wilson19-Mar-04 8:03
Craig G. Wilson19-Mar-04 8:03 
GeneralRe: Loading assemblies Pin
Craig G. Wilson19-Mar-04 8:34
Craig G. Wilson19-Mar-04 8:34 
GeneralRe: Loading assemblies Pin
Heath Stewart21-Mar-04 12:36
protectorHeath Stewart21-Mar-04 12:36 
Generalcombobox databinding from webservice in mobile application Pin
Littlefool19-Mar-04 2:43
Littlefool19-Mar-04 2:43 
Hi, I'm developing a smart device application in c# at the moment.
I have made a webservice who access my SQL database and returns a DataSet with data (a name and an ID).

The meaning is that the first combobox will fill with the associations, and by choosing an association, the second combobox will fill with the institutions of that association.

In my webapplication, I have databinded this DataSet white success to my dropdownlist, but in this mobile application, I always have an error. (but finally I also receive the right information, my combobox will fill with the right information)
I've catcht the error in a messagebox so my programme won't stop during running, and I found out that during Page_Load() he gives the error catched in ComoboBox1_IndexeChanged().

By starting the application, I get first a few "error2-FormatException" and than an "error1-ArgumentException". Afther that my combobox is filled with my associations. By selecting another association, I get an "error2-ArgumentException" before my combobox is filled with the institutions of that association. Confused | :confused: Sigh | :sigh:

I know it's a long explanation but I've tried everything and all the examples I've found on the internet gives exactly what I have programmed.
Can anyone please help me with it?? D'Oh! | :doh:
Thank you very much Rose | [Rose]

private void Form1_Load(object sender, System.EventArgs e)
{
try
{
Service service = new Service();
DataSet dataset = new DataSet();
dataset = service.getAssociations();
comboBox1.DataSource = dataset.Tables["associations"];
comboBox1.DisplayMember = "cName";
comboBox1.ValueMember = "ID";
comboBox1.DataBindings.Clear();
comboBox1.DataBindings.Add("SelectedValue", dataset, "associations.ID");
}
catch (Exception error)
{
MessageBox.Show(error.ToString(), "error1");
}
}

private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
try
{
Service service = new Service();
DataSet dataset = new DataSet();
dataset = service.getInstitutions(Int32.Parse (ComboBox1.SelectedValue.ToString()));
comboBox2.DataSource = dataset.Tables["institutions"];
comboBox2.DisplayMember = "cName";
comboBox2.ValueMember = "ID";
comboBox2.DataBindings.Clear();
comboBox2.DataBindings.Add("SelectedValue", dataset, "institutions.ID");
}
catch (Exception error)
{
MessageBox.Show(error.ToString(), "error2");
}
}
GeneralCreating virtual File Item in C# Pin
Tristan Rhodes19-Mar-04 2:17
Tristan Rhodes19-Mar-04 2:17 
GeneralRe: Creating virtual File Item in C# Pin
Heath Stewart19-Mar-04 4:34
protectorHeath Stewart19-Mar-04 4:34 
GeneralRe: Creating virtual File Item in C# Pin
Tristan Rhodes19-Mar-04 6:04
Tristan Rhodes19-Mar-04 6:04 
GeneralRe: Creating virtual File Item in C# Pin
Heath Stewart19-Mar-04 6:19
protectorHeath Stewart19-Mar-04 6:19 
GeneralRe: Creating virtual File Item in C# Pin
Tristan Rhodes19-Mar-04 8:15
Tristan Rhodes19-Mar-04 8:15 
GeneralRe: Creating virtual File Item in C# Pin
Heath Stewart21-Mar-04 12:43
protectorHeath Stewart21-Mar-04 12:43 
GeneralVS .Net Pin
ppp00118-Mar-04 23:05
ppp00118-Mar-04 23:05 
GeneralRe: VS .Net Pin
Mazdak18-Mar-04 23:20
Mazdak18-Mar-04 23:20 
GeneralRe: VS .Net Pin
Rhys__66618-Mar-04 23:31
Rhys__66618-Mar-04 23:31 
GeneralRe: VS .Net Pin
Mazdak19-Mar-04 9:37
Mazdak19-Mar-04 9:37 
GeneralRe: VS .Net Pin
Heath Stewart19-Mar-04 4:22
protectorHeath Stewart19-Mar-04 4:22 
GeneralRe: VS .Net Pin
profoundwhispers19-Mar-04 5:45
profoundwhispers19-Mar-04 5:45 
GeneralRe: VS .Net Pin
Heath Stewart19-Mar-04 6:22
protectorHeath Stewart19-Mar-04 6:22 
GeneralRe: VS .Net Pin
profoundwhispers20-Mar-04 22:41
profoundwhispers20-Mar-04 22:41 
GeneralRe: VS .Net Pin
Heath Stewart21-Mar-04 12:57
protectorHeath Stewart21-Mar-04 12:57 
GeneralRe: VS .Net Pin
profoundwhispers20-Mar-04 22:42
profoundwhispers20-Mar-04 22:42 
GeneralCOM Scriptlet Access from CSharp Pin
Davy Mitchell18-Mar-04 23:01
Davy Mitchell18-Mar-04 23:01 

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.