❔ Filter doesn't work

When I click on the radiobutton the query doesn't change
14 Replies
Pobiega
Pobiega2y ago
Your method is called LoadSomething, when is it executed? on page load? I dont see any event handlers or bindings on your radiobutton, so there is likely no reactivity going on
PolatAlemdar
PolatAlemdarOP2y ago
PolatAlemdar
PolatAlemdarOP2y ago
PolatAlemdar
PolatAlemdarOP2y ago
when HomePage opens this page is opening But I have to filter motorized and towed vehicles
Pobiega
Pobiega2y ago
Right. Well, the problem is that you run the Load method in the constructor so when the radio button changes, that method as already run and wont run again
PolatAlemdar
PolatAlemdarOP2y ago
Oh
Pobiega
Pobiega2y ago
you could add an eventhandler to the radiobuttons so you can run some code when they change values
PolatAlemdar
PolatAlemdarOP2y ago
So I need this private void rdbGemotoriseerd_Checked(object sender, RoutedEventArgs e) { }
Pobiega
Pobiega2y ago
thats an eventhandler for a radio button, yes
PolatAlemdar
PolatAlemdarOP2y ago
I was already trying with the eventhandlers but that makes my code to "dirty"
Pobiega
Pobiega2y ago
well, the alternative is to start using NotifyOnPropertyChange and model binding but I think thats going to be... hard for you.
PolatAlemdar
PolatAlemdarOP2y ago
😁 Thank you for helping
Pobiega
Pobiega2y ago
welcome is you
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server