Update DataGrid Data when Changing DropDown Value in MainLayout

Hello everyone,

I'm trying to refresh my DataGrid according to the value selected in the DropDown (declared on MainLayout). Is there a way I can do this?

Thanks in advance

Yes, we are doing the same with global properties. You need to bind the DropDown in the layout to a property and raise event on property value change. You can catch this event in the page and execute needed code.

The DropDown value is defined as a global property. My question here is when I select/change the dropdown value, I want to refresh the Grid values (dynamically / automatically) instead of reloading the page.

It depends how the grid is bound. If it’s bound in the Load() of the page you need to call this method.

Hum, I see, in the change event (MainLayout) I can call the target page method?
What's the best way to initialize the class?

Check the code generated for global properties. We are using service.

1 Like