导出按钮/ dxo-export是dx-data-grid的一部分。我想使这两个dx按钮与dxo-export按钮并行,并使它们也正确对齐。因此,dx按钮和dxo导出按钮具有相同的行和对齐方式。
这是我的代码。 Dx按钮在dx数据网格之外。所以我想这就是为什么按钮不能在一起的原因
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
NotificationCenter.default.post(Notification(name: Notification.Name("didReceiveNotification")))
}
}
class TabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(
self,
selector: #selector(updateBadgeCount),
name: Notification.Name(rawValue: "didReceiveNotification"),
object: nil
)
}
@objc private func updateBadgeCount() {
// Update badge count
}
deinit {
NotificationCenter.default.removeObserver(self)
}
}
答案 0 :(得分:0)
onToolbarPreparing(e){
this.gridElement = e.element;
this.toolbarItems = e.toolbarOptions.items;
this.toolbarItems.unshift({
name: 'realistPlanButton',
location: 'after',
widget: 'dxButton',
options: {
hint: 'Realisasi Rencana',
icon: 'fas fa-clipboard-check',
onClick: this.realistPlan.bind(this)
}
},{
name: 'sharePlanButton',
location: 'after',
widget: 'dxButton',
options: {
hint: 'Realisasi Rencana',
icon: 'fa fa-share-alt',
onClick: this.sharePlan.bind(this)
}
});
}