0
votes

Sometimes width of column containing inline edit buttons is too small. Its width cannot changed by mouse.

For example, open demo from

http://www.ok-soft-gmbh.com/jqGrid/OK/RemovePageHorizontalScrollbar2.htm

and try to resize actions or number column by dragging its right border in header. Column width does not change.

How to fix this so that actions and number column widths can also changed by user ?

1

1 Answers

1
votes

The referenced example contains the column defined as

{ name: "act", template: "actions", width: 66 }

The width of the act column is fixed and it is 66px. The template actions will be defined as the following (see the line of code):

actions: function () {
    return {
        formatter: "actions",
        width: (this.p != null && this.p.fontAwesomeIcons ? 33 : 37) + (jgrid.cellWidth() ? 5 : 0),
        align: "center",
        label: "",
        autoResizable: false,
        frozen: true,
        fixed: true,
        hidedlg: true,
        resizable: false,
        sortable: false,
        search: false,
        editable: false,
        viewable: false
    };
}

You can see that it contains fixed: true, resizable: false properties. If you want to change the properties that you can just redefine the values of the template in the column definition:

{ name: "act", template: "actions", width: 66, fixed: false, resizable: true }