I am using MVVM. My VM has two properties (1) [Data] which returns ObservableCollection<Account> and (2) [AccountAttributes] which returns ObservableCollection<AccountAttribute>.
I View's code behind DataContext set to above class. [Data] is bound to xamDataGrid and it works fine. I want to bind an property in [AccountAttributes] to XamComboEditor which is linked to a column in xamDataGrid. What is the exact syntax in XAML? If I change [AccountAttributes] to List<string> it works fine but want it to be an ObservableCollection.
Thanks.
Sure, thanks for all your help.
Hello Jay,
Thank you for the feedback.
I am glad to know you were able to achieve the desired functionality.
If you have any questions, please let me know.
I tested the application by commenting these couple of lines as well and I was still able to successfully add new items to the XamDataGrid and its underlying DataSource (the only difference is that the XamDataGrid had no data initially, which is expected).
I have attached a sample application that shows the content of the ObservableCollection on a button click. (refer to the screenshot.png image inside the img folder of the zip)
My apologies - it is when you COMMENT the above two lines, the ObservableCollection is empty and I am not able to add new rows. Please try it.
As for the XamComboEditor issue, I haven't yet got to adding that in my app. Will do so and post later.