Forum

jqgrid, how to exte...
 
Notifications
Clear all

jqgrid, how to extend actions with additional button?

   RSS

0
Topic starter

how..

1 Answer
0
Topic starter

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);
                        }
                    }
                ]
            }

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: