lollitaz

lollitaz

  • NA
  • 3
  • 0

data binding dataset and combobox

Dec 17 2004 7:26 AM
hi everybody, im writing an cf applikation and i tried to bind a dataset to a combobox: private void Form1_Load(object sender, System.EventArgs e) { DataSet ds = new DataSet(); ds.Tables.Add("test"); ds.Tables["test"].Columns.Add("id"); ds.Tables["test"].Columns.Add("name"); for(int i=0; i<20; i++) { object[] te = new object[2]; te[0] = i; te[1] = "name" + i + "id"; ds.Tables["test"].Rows.Add(te); } DataViewManager dvm = new DataViewManager(ds); this.comboBox1.DataSource = dvm; this.comboBox1.DisplayMember="test.id"; this.textBox1.DataBindings.Add("text",dvm, "test.name"); } in a 'normal' windows app it works. on the mobile device an exception is thrown: 'System.ArgumentException' whats the difference here between cf and 'normal' .net? what do i have to change? big thanks, charms

Answers (1)