Windows CE 3.5 (Windows Forms) and Combobox…

Hello together i hope you can help me. First of all i am german so pls dont judge me for the english.. As you can see in the topic i am working with Windows Forms / Windows CE 3.5 in Visual Studio 2008. I have to work with it because of some sdk's wich only work in VS05 & VS08. And this is where the problems begin.

To the problem: I have two comboboxes. I want to select a argument in comboBox1 with wich i can filter the shown values in comboBox2. In Form_Load i need to load a file with datas with Streamreader :

System.IO.StreamReader ExampleFile = new System.IO.StreamReader(@"\Program Files\Installer_inventur\ExampleFile.txt");

while (!ExampleFile.EndOfStream) { string zeile = ExampleFile.ReadLine(); string[] Daten = zeile.Split(':');

for (int i = 0; i < Daten.Length; i++) { zeile = Daten[i].ToString(); comboBox2.Items.Add(Daten[i]); i++; } 


The informations in the txt look like : "Max, Mustermann",Abt 1: "Mustermann,Max",Abt 2:…… So one data block in comboBox2 look like ' "Max, Mustermann",Abt 1 '. Now i want to set in comboBox1 the last one of these blocks like : 1 or 2 … The whole block is a string cause of the Streamreader.

What i need: I need to choose the 1 or 2.. in comboBox1 and then in comboBox2 the only shown things should be the informations with the right data(1 or 2..) at the end.

Hopefully u can understand the problem. Just tell me if you need more informations.

Thankfully Boneshot

by Boneshot via /r/csharp

Leave a Reply