Frage

I want to put a Delete button on my Screen whose state depends on if a row is selected in the Screen and some other conditions... basically I want to let the user be able to delete the current selected item, the problem here is that I can't find an appropriate event in the table to add custom logic when a new row becomes active.

War es hilfreich?

Lösung

In the delete button's _canExecute() method just put the following code:

myapp.MyScreen.DeleteButton_canExecute = function (screen) {
    return screen.Orders.selectedItem != null;
};

You can also control whether the button is visible when disabled by checking or unchecking the "Hidden if disabled" checkbox in the properties for the selected button.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top