My API gives me a boolean value where I want to decide if I should enable a Botton or not, based on the loaded item in a detail view.
When loading the page, I invoke a datasource method which gives me the details including the boolean value if the button should be enabled or not.
I tried 2 things:
- bind the "disabled"-property of the button to my boolean value.
- set a property with this boolean value and bind the "disabled"-property of the button with this property.
I already got a similar thing to work: when I click on a row in a grid, I can make a button enabled or disabled. But this approach seems not to work when I load a page.
Do you have an idea how I can control the disabled/enabled state of a button based on the result of an invoked datasource method for an detail view that I call with an ID?