Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
4716 | May 28,2003 07:17 AM UTC | Oct 15,2003 09:57 AM UTC | WinForms | 12 |
![]() |
Tags: GridControl |
this.comboBoxExt1.BindingContext = this.BindingContext;
this.gridListControl1.BindingContext = this.BindingContext;
This will set both contexts equal to your form's BindingContext.
Me.GridListControl1.DataBindings.Add("SelectedValue", ds, "table1.id")
ComboBoxExt1.ListControl = GridListControl1
GridListControl1.DataSource = GET_TABLE("SOMETHING")
GridListControl1.DisplayMember = "lib"
GridListControl1.ValueMember = "id"
ComboBoxExt1.BindingContext = Me.BindingContext
GridListControl1.BindingContext = Me.BindingContext
Me.BindingContext(ds, "table1").Current
is at the good value first...and never change...
help me pleazzz...
lobrys
Me.GridListControl1.DataBindings.Add("SelectedValue", ds, "table1.id")
When you set the DataSource and ValueMember, this automatically binds the SelectedValue.
If that does not work, if you can attach a sample shwoingthe problem we can look into it. Or, you can submit a Direct Trac support incident with a project. Me.GridListControl1.DataBindings.Add("SelectedValue", ds, "tab_ds.father")
and instead listen to the ComboBoxExt1_SelectionChangeCommitted event and explicitly set the value there. Here is your sample back with the changes. I also added a couple of dataGrids just to see the raw datatables as you change the combobox.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.