jqgrid, how to extend actions with additional button?« Wróć do listy pytań

how..
Wysłane przez mrmucha
Zadane przez 27/06/2018 11:23
0

1. It’s not easy and requires some workaround – http://ok-soft-gmbh.com/jqGrid/TestSamle/Admin1.htm
2. Better migrate to free jqGrid – example : http://www.ok-soft-gmbh.com/jqGrid/OK/CustomActionButton.htm
project: https://github.com/free-jqgrid/jqGrid
3. much easer and almost same initilization parameters like orginal jqgrid

free jqGrid code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
actionsNavOptions: {
                addUsericon: "fa-user-plus",
                addUsertitle: "Add user",
                deleteUsericon: "fa-user-times",
                deleteUsertitle: "Delete user",
                addToCarticon: "fa-cart-plus",
                addToCarttitle: "Add item to the cart",
                custom: [
                    {
                        action: "addUser", position: "first", onClick: function (options) {
                            alert("Add user, rowid=" + options.rowid);
                        }
                    },
                    {
                        action: "sendEmail", position: "first", onClick: function (options) {
                            alert("Przypomnij o serwisie, rowid=" + options.rowid);
                        }
                    },
                    {
                        action: "deleteUser", onClick: function (options) {
                            alert("Delete user, rowid=" + options.rowid);
                        }
                    }
                ]
            }
actionsNavOptions: {
                addUsericon: "fa-user-plus",
                addUsertitle: "Add user",
                deleteUsericon: "fa-user-times",
                deleteUsertitle: "Delete user",
                addToCarticon: "fa-cart-plus",
                addToCarttitle: "Add item to the cart",
                custom: [
                    {
                        action: "addUser", position: "first", onClick: function (options) {
                            alert("Add user, rowid=" + options.rowid);
                        }
                    },
                    {
                        action: "sendEmail", position: "first", onClick: function (options) {
                            alert("Przypomnij o serwisie, rowid=" + options.rowid);
                        }
                    },
                    {
                        action: "deleteUser", onClick: function (options) {
                            alert("Delete user, rowid=" + options.rowid);
                        }
                    }
                ]
            }
Wysłane przez mrmucha
Odpowiedziane 27/06/2018 11:25