The sortable column functionality does not seem to work correctly. This is my case:
I have a grid with sortable columns. Then I drag the last column to the first position. Now it is not possible to resize the first column.
This is especially inconvenient when I define a resizable class: all columns are displayed as resizable, except the last column.
Is this a bug or is it caused by my grid configuration?
(test)Grid configuration:
$(document).ready(function () {
jQuery(“#treegrid”).jqGrid({
url:'http://localhost:50086/Users/List' + '?page=1&rows=100&sidx=UserName&sord=desc&q=',
datatype: “json”,
mtype: “GET”,
colNames: [“Id”, “UserName”, “Name”, “Email”],
colModel: [
{ name: 'id', index: 'id', width: 1, hidden: true, key: true },
{ name: 'UserName', index: 'name', width: 180 },
{ name: 'Name', index: 'acc_num', width: 80, align: “center” },
{ name: 'Email', index: 'debit', width: 80, align: “right” }
],
height: 'auto',
pager: “#ptreegrid”,
ExpandColumn: 'name',
altclass: 'alternateRow', //The class that is used for alternate rows. You can construct your own class and replace this value. This option is valid only if altRows options is set to true
altRows: true, //Set a zebra-striped grid
resizeclass: “resizable”, //Assigns a class to columns that are resizable so that we can show a resize handle only for ones that are resizable
multiselect: true, //If this flag is set to true a multi selection of rows is enabled. A new column at left side is added. Can be used with any datatype option.
scroll: false, //True scrolling on
rowNum: 100,
height: “auto”,
autowidth: true, //The grid width is recalculated automatically to the width of the parent element.
forceFit: true, //The adjacent column (to the right) will resize so that the overall grid width is maintained
autoencode: true, //When set to true encodes (html encode) the incoming (from server) and posted data (from editing modules). By example < will be converted to <
sortable: true, //When enabled this option allow column reordering with mouse.
hoverrows: false
});
});
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top