Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).bind('resize', function() {
- $('#tasks').setGridWidth($(getSelectedTabHref()).width());
- $('#tasks').setGridHeight($(window).height()-190);
- }).trigger('resize');
- $('#tasks').jqGrid({
- datatype: 'local',
- colNames:[labels['tasksNum'],labels['tasksAdded']+"/"+labels['tasksAccepted'],labels['tasksOperator'],labels['tasksClient'],labels['tasksManager'],labels['tasksDesc']],
- colModel :[
- {name:'taskId', index:'taskId', width:1, align:'right'},
- {name:'taskAdded', index:'taskAdded', width:3},
- {name:'taskOperator', index:'taskOperator', width:4},
- {name:'taskClient', index:'taskClient', width:7},
- {name:'taskManager', index:'taskManager', width:4},
- {name:'taskDesc', index:'taskDesc', width:8}]
- });
- .ui-jqgrid .ui-jqgrid-bdiv {
- position: relative;
- margin: 0em;
- padding:0;
- /*overflow: auto;*/
- overflow-x:hidden;
- overflow-y:auto;
- text-align:left;
- }
- autowidth: false,
- shrinkToFit: true
- "autowidth" : true
- "shrinkToFit": false
- .ui-jqgrid .ui-jqgrid-bdiv { height: auto; margin: 0em; max-height: 250px; overflow-x: auto; overflow-y: auto; padding: 0px; position: relative; text-align: left; }
- var gr = jq('#grid');
- gr.setGridHeight(350,true);
- loadComplete: function (data) {
- //set our "ALL" select option to the actual number of found records
- $(".ui-pg-selbox option[value='ALL']").val(data.records);
- if ($(".ui-jqgrid").height() > $('#grid').getGridParam('maxHeight')) {
- //resize our grid for the vertical scroll bar to eliminate the hortizontal scroll bar
- $(".ui-jqgrid").css("width", $('#grid').getGridParam('width') + 20);
- $(".ui-jqgrid-bdiv").css("width", $('#grid').getGridParam('width') + 17);
- $(".ui-jqgrid-hdiv").css("width", $('#grid').getGridParam('width') + 20);
- $(".ui-jqgrid-view").css("width", $('#grid').getGridParam('width') + 20);
- $("#pager").css("width", $('#grid').getGridParam('width') + 20);
- $(".ui-jqgrid-hbox").css("padding-right", "16px");
- } else { //set everything to defaults
- $(".ui-jqgrid").css("width", $('#grid').getGridParam('width'));
- $(".ui-jqgrid-bdiv").css("width", $('#grid').getGridParam('width'));
- $(".ui-jqgrid-hdiv").css("width", $('#grid').getGridParam('width'));
- $(".ui-jqgrid-view").css("width", $('#grid').getGridParam('width'));
- $("#pager").css("width", $('#grid').getGridParam('width'));
- $(".ui-jqgrid-hbox").css("padding-right", "0px");
- }
Add Comment
Please, Sign In to add comment