Third party WinForms control correct binding? #3366
Unanswered
Metadorius
asked this question in
Q&A
Replies: 1 comment
-
Update: I tried to hack in this (in the d(this.WhenAnyValue(x => x.ViewModel.SelectedDiscipline).Subscribe(x => gridView1.FocusedRowHandle = gridView1.FindRow(x))); But I feel this is more like a hack than a proper solution. Does anyone have an idea on how it would be better to do this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a legacy project that relies on WinForms and third party control providers, DevExpress in this case. In order to incorporate separation of UI from business logic I decided to use this wonderful library, though, as expected, the support for third party controls is lacking so I have to implement custom bindings from events. It works fine to some extent when I do this for
FocusedRowObject
inGridView
for example:ViewModel:
Thing is, what I found is that binding is one-way (I think? I am a newbie to MVVM and ReactiveUI, so please bear with me 😅), so the value only propagates to ViewModel when I set it from View, but not vice versa. What am I doing wrong?
If that helps, I found that
FocusedRowObject
is a readonly property that reads value from a weak ref. I suspect that I need to somehow handle setting it manually via DevExpress' provided row focusing function. May that be it?Beta Was this translation helpful? Give feedback.
All reactions