1
Help for ParamQuery Pro / Re: Can PQ support the features described in the picture ?
« on: August 23, 2021, 11:12:53 am »
Ok, I'll try it.
Thanks
Thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
grid.setSelection({colIndx: 1})
function to select the column, but it occur error, it must has rowIndx property.grid.setSelection({rowIndx: 0, colIndx: 1})
function, it only select the body data cell[0,1] not the whole column.dataModel: {
location: 'remote',
url: '/news',
contentType: 'application/json; charset=UTF-8',
postData: {"author":"jack", "isTopic": 1},
dataType: 'JSON',
method: 'POST'
}
beforeSend: function(xhr, settings) {
settings.data = JSON.stringify({....});
}
_isLocal: ( function() {
var rhash = /#.*$/;
return function( anchor ) {
var anchorUrl, locationUrl;
anchorUrl = anchor.href.replace( rhash, "" );
locationUrl = location.href.replace( rhash, "" );
// Decoding may throw an error if the URL isn't UTF-8 (#9518)
try {
anchorUrl = decodeURIComponent( anchorUrl );
} catch ( error ) {}
try {
locationUrl = decodeURIComponent( locationUrl );
} catch ( error ) {}
return anchor.hash.length > 1 && anchorUrl === locationUrl;
};
} )()
<html>
<head>
<!-- a bug here -->
<base href="./" />
<link rel="stylesheet" href="jquery-ui.css" />
<link rel="stylesheet" href="pqgrid.min.css" />
<script src="jquery.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="pqgrid.min.js"></script>
</head>
<body>
<div id="grid_json" style="margin:100px;"></div>
<script>
$(function () {
var data = [
{ rank: 1, company: 'Exxon Mobil', revenues: 339938.0, profits: 36130.0 },
{ rank: 2, company: 'Wal-Mart Stores', revenues: 315654.0, profits: 11231.0 }
];
var obj = {
numberCell:{resizable:true,title:"#",width:30,minWidth:30},
title: "ParamQuery Grid with JSON Data",
menuIcon: true,
scrollModel:{autoFit:true}
};
obj.colModel = [
{ title: "Rank", width: 100, dataType: "integer", dataIndx: "rank" },
{ title: "Company", width: 200, dataType: "string", dataIndx: "company" },
{ title: "Revenues ($ millions)", width: 150, dataType: "float", format: '$#,###.00', dataIndx: "revenues" },
{ title: "Profits ($ millions)", width: 150, dataType: "float", format: '$#,###.00', dataIndx: "profits" }
];
obj.dataModel = { data: data };
$("#grid_json").pqGrid(obj);
});
</script>
</body>
</html>