简体   繁体   中英

Kendo UI inline editing: How to hide a button when other one is clicked

I have a Kendo UI grid with inline editing. I need to hide update button when edit is clicked.

                {
                    command: [
                              { name: "edit" },
                              {
                                  name: "update",
                                  click: function (e) {
                                      savedata();
                                  },
                              },
                              { name: "destroy" } 
                    ],
                    title: " ",
                    width: 140,
                    attributes: { style: "text-align: center; color:Blue" },
                },

I dont think that kendo from box have that behavior.

What can you do:

In edit command add onClick handler where you will hide other buttons:

  • in event arguments e there always some grid row data using which you can find current row with selector or may be just using closest

  • Update button in kendo always have class k-grid-update , find it and hide

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM