Forum
02:38
20/10/2013
Hi all,
Im trying to set up a grid with a column chooser, but so far I didn't get very lucky.
I already checked that the column chooser is called, but the popup just doesn't show. Does anyone of you know why this might be?
HTML:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My First Grid</title>
<link rel="stylesheet" type="text/css" media="screen" href="css/smoothness/jquery-ui-1.10.3.custom.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<style type="text/css">
html, body {
overflow: hidden;
margin: 0;
padding: 0;
font-size: 75%;
}
</style>
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.src.js" type="text/javascript"></script>
<!--<script src="plugins/jquery.multiselect.min.js" type="text/javascript"></script>-->
<script type="text/javascript">
$(function () {
$grid = $("#list").jqGrid({
url: "getdata.php",
datatype: "xml",
mtype: "GET",
colNames: ["No","Bedrijf", "Vacature", "Plaats bedrijf", "Plaats vestiging", "HBO", "Int"],
colModel: [
{ name: "idopdrachten", width: 10, hidden: true },
{ name: "bedrijfsnaam", width: 40 },
{ name: "vacaturenaam", width: 90 },
{ name: "plaats_bedrijf", width: 80, align: "right" },
{ name: "plaats_vestiging", width: 80, align: "right" },
{ name: "geschikt_HBO", width: 10, align: "center" },
{ name: "geschikt_int", width: 10, align: "center" }
],
pager: "#pager",
rowNum: 50,
rowList: [10, 20, 30],
sortname: "bedrijfsnaam",
sortorder: "asc",
viewrecords: true,
gridview: true,
autoencode: true,
caption: "My first grid",
height: $(window).height()-100,
autowidth: true,
scroll: 1
});
$grid.jqGrid('navGrid', '#pager', {edit: false, add: false, del: false, refresh:false}, {}, {}, {}, {
multipleSearch: true,
multipleGroup: true,
recreateFilter: true
});
$grid.jqGrid('filterToolbar', {stringResult: true, searchOnEnter: true, defaultSearch: "cn"});
$grid.navButtonAdd( '#pager',{
caption: "Kolommen toevoegen of verwijderen",
title: "Reorder Columns",
onClickButton : function (){
$grid.jqGrid("columnChooser", {"msel_opts": $.ui.multiselect.defaults});
}
})
});
</script>
</head>
<body>
<table id="list"><tr><td></td></tr></table>
<div id="pager"></div>
</body>
</html>
Kind regards
08:34
Moderators
30/10/2007
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
29 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66