views:

85

answers:

1

Using jqGrid version 3.6.5

Current pager extended options:

{ add: false, del: false, edit: false, search: false, 
    refresh: false, position: "left" }

Current grid options:

$("#tblID").jqGrid({
                url: '...',
                datatype: datatype,
                datastr: GridJsonData,
                mtype: 'GET',
                colNames: arrColumnLabels,
                colModel: gridColumns,
                rowNum: 10,
                rowList: [10, 20, 30],
                pager: $('#pgrID'),
                sortname: '',
                viewrecords: true,
                sortorder: "desc",
                caption: "",
                forceFit: true,
                previewPaneMessageId: 0,
                previewPaneProjectId: 0,
                height: "100%",

Fixed width columns appear different from initial load after I navigate with the pager. Is there an options I need to add to ensure that widths in colModel persists?

I notice the setGridWidth is the method causing the problem. So I need a solution which uses setGridWidth but still allow the columns with fixed widths to remain fixed (according to colModel), while the dynamic width columns expand/reduce to fill the gap.

A: 

I had to upgrade to jqgrid 3.7.2 and utilise the "fixed" property.

[DataMember(Name = "fixed")]
        public bool Fixed { get; set; }

...

internal static JsonColumnData JsonColumnGridSelector
        {
            get { return new JsonColumnData { name = "GridSelector", index = "", width = 35, Fixed = true, align = "center"
Brandon
I you found a solution of your problem you should mark his own solution as accepted.
Oleg
Can only accept own solution after certain time limit.
Brandon