User (Old forums)MemberMay 22, 2007 at 11:16 amPost count: 23064
On your documentation it says that two way binding is only enabled when the binding mode is set properly. How do i enable the TwoWay binding If i use ItemsSource from your grid? I am having a Singleton as Datasource:
incidentView.ItemsSource = Model.GetInstance();
The Model looks kind of like that (i would like to bind the grid to the items of the ObservableCollection):
public class IncidentList : ObservableCollection<Incident>
private static Model _instance;
public static Model GetInstance()
if (_instance != null) return _instance;
_instance = new Model();
Imported from legacy forums. Posted by Ralf (had 2826 views)User (Old forums)MemberMay 22, 2007 at 12:00 pmPost count: 23064
I tryed it now with explicyt binding:
Binding binding = new Binding(“GetInstance()”);
binding.Mode = BindingMode.TwoWay;
binding.Source = Model.GetInstance();
If i understand things right i need a DependencyProperty from the Xceed datagrid. I tryed to use “Items” but ofcourse it does not work because it is am ItemCollection… Does the your datagrid provice something like a DependencyProperty or is there another way to achieve two way data binding?
Thanks for the help in advance!
Imported from legacy forums. Posted by Ralf (had 334 views)User (Old forums)MemberMay 22, 2007 at 2:38 pmPost count: 23064
it works, but only if i call grid.Items.Refresh(); not very practicable 🙁
My Datasource object is an ObservableCollection of objects who implement the INotifyProperty interface. It should work, any idea why it doesn’t?
Imported from legacy forums. Posted by Ralf (had 239 views)User (Old forums)MemberMay 22, 2007 at 6:21 pmPost count: 23064
I have found out what my problem is:
I was trying to use the datagrid in a project which we started earlier in .Net2.0. Obviously there is an interoperability problem between both technologies. Is there an easy way to get this working or should i rather stick to the “old fashioned” microsoft .Net20 control 🙂
Imported from legacy forums. Posted by Ralf (had 3995 views)
- You must be logged in to reply to this topic.