Hi All,
This is a bit trivial but I'm just not getting it, my apologies...
I have a Dds returning a parent / child fine using .Include.
Three controls on the child window page for editing .. a listbox, GridView and DataForm.
Listbox is bound to the parent.
GridView is bound to the child like Dds.DataView.tblChild.
As selections are changed on the listbox the DataGrid keeps sync, no issues there.
I'm trying to use the dataform to edit the selected row in the DataGrid but can't seem to get the binding correct.
I'm tried Dataform.CurrentItem = datagrid.SelectedItem & various ItemSource bindings (tried the Dds, tried element binding to datagrid.itemssource).
I just can't get the dataform to sync to the grid selection changes. (I'm using the toolkit, not telerik at the moment because of themes).
Any suggestions would be appreciated.
Thanks as always,
Mark
Here is a little code if that helps for understanding:
This is a bit trivial but I'm just not getting it, my apologies...
I have a Dds returning a parent / child fine using .Include.
Three controls on the child window page for editing .. a listbox, GridView and DataForm.
Listbox is bound to the parent.
GridView is bound to the child like Dds.DataView.tblChild.
As selections are changed on the listbox the DataGrid keeps sync, no issues there.
I'm trying to use the dataform to edit the selected row in the DataGrid but can't seem to get the binding correct.
I'm tried Dataform.CurrentItem = datagrid.SelectedItem & various ItemSource bindings (tried the Dds, tried element binding to datagrid.itemssource).
I just can't get the dataform to sync to the grid selection changes. (I'm using the toolkit, not telerik at the moment because of themes).
Any suggestions would be appreciated.
Thanks as always,
Mark
Here is a little code if that helps for understanding:
dg_children.SetBinding(RadGridView.ItemsSourceProperty, new Binding("DataView.tblVarietals") { Source = OriginDds });
GridViewDataColumn colVar = new GridViewDataColumn();
colVar.Header = "Varietal";
colVar.DataMemberBinding = new Binding("varietalName");
colVar.IsReadOnly = true;
colVar.Width = new GridViewLength(1, GridViewLengthUnitType.Star);
colVar.UniqueName = "Varietal";
dg_children.Columns.Add(colVar);
gridSet = true;
df_child.EditTemplate = this.Resources["VarietalDataTemplate"] as DataTemplate;
df_child.SetBinding(DataForm.ItemsSourceProperty, new Binding("DataView.tblVarietals") { Source = OriginDds });
//This unfortunately does not work
//df_child.SetBinding(DataForm.CurrentItemProperty, new Binding("SelectedItem") {Source = dg_children});