Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的屏幕上放置一个删除按钮,其状态取决于是否在屏幕中选择了一行以及其他一些条件......基本上我想让用户能够删除当前选定的项目,这里的问题是当新行变为活动状态时,我无法在表中找到适当的事件来添加自定义逻辑。
在删除按钮的 _canExecute() 方法中只需输入以下代码:
myapp.MyScreen.DeleteButton_canExecute = function (screen) { return screen.Orders.selectedItem != null; };
您还可以通过选中或取消选中所选按钮属性中的“如果禁用时隐藏”复选框来控制按钮在禁用时是否可见。