I cannot see them, the DataGridView is empty. Calin Tatar Where have you found the property "AutoGenerateColumns"?, I couldn't find it.
AxiliuM
Posts
-
DataGridView doesn't display anything. -
DataGridView doesn't display anything.Hello! I have 2 forms. The first has a DataSet with a table("Table1"), the second form has a BindingSource, BindingNavigator, DataGridView;
//... Form1 fmMain=new Form1; //...Button click Form2 fmSecond=new Form2(); fm.ShowDialog(fmMain) //... private void Form2_Load(object sender, EventArgs e) { BindingSource.DataSource = ((Form1)this.Parent).DataSet; BindingSource.DataMember = "Table"; DataGridView.DataSource=BindingSource; BindingNavigator.BindingSource=BindingSource; }
BindingNavigator shows that there are 100 rows and the position=1, but DataGridView doesn't display anything. But this code works://... Form1 fmMain=new Form1; //...Button click Form2 fmSecond=new Form2(); fm.ShowDialog(fmMain) //... private void Form2_Load(object sender, EventArgs e) { DataGridView dt = new DataGridView(); BindingSource.DataSource = ((Form1)this.Parent).DataSet; BindingSource.DataMember = "Table"; dt.DataSource=BindingSource; dt.Parent = this; BindingNavigator.BindingSource=BindingSource; }
Does anybody have some ideeas? -
A problem with DataBinding. [modified]Thank you! :)
-
A problem with DataBinding. [modified]I have 2 tables >>Tb_orders (date, ... , id_cust1, id_cust2) >>Tb_customers(id_cust, name ...) and I need to edit the fields id_cust1, id_cust2 using ComboBox
cBox1.DataSource = Tb_customers;
cBox1.DisplayMember = "name";
cBox1.ValueMember = "id_cust";
cBox1.DataBindings.Add("SelectedValue", Tb_orders, "id_cust1");
cBox2.DataSource = Tb_customers;
cBox2.DisplayMember = "name";
cBox2.ValueMember = "id_cust";
cBox2.DataBindings.Add("SelectedValue", Tb_orders, "id_cust2");everything is clear but cBox1 and cBox2 have the same value. I dont know what I have to do..
modified on Saturday, January 31, 2009 2:03 AM