I am trying to remove duplcates from a combobox however this doesn't seem to result in a correct combobox, since he fill the combobox with the following text.
"System.Linq.Enumerable+d__64`1[System.Char]"
I have the following code and are using a access database with generated datasets.
I have 3 comboboxes that i want to fill with data from the database. CoboBox 1 is filled with data and then it the removes the doubles (duplicates). When i select a value from ComboBox 1 it will update CoboBox2 with the possible choices based on ComboBox 1 and if I select a value from ComboBox 2 it fills ComboBox3 with resulting data.Code:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Linq.Expressions; namespace Generator { private void matGroupBindingNavigatorSaveItem_Click(object sender, EventArgs e) { this.Validate(); this.matGroupBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.matGroupDataSet); } private void frmImport_Load(object sender, EventArgs e) { this.matGroupTableAdapter.Fill(this.materialGroupDataSet.MatGroup); //Distinct var BaseM = materialGroupDataSet.MatGroup.Select(row => row["BaseMs"].ToString().Distinct()); foreach (var BaseMs in BaseM) { cmbBaseMat.Items.Add(BaseMs); } }
I'm now first trying to filter out the duplicates.




Reply With Quote
