forked from Mirrors/apostrophe
130 lines
3.9 KiB
HTML
130 lines
3.9 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<title>Grouping & ungrouping of rows and columns - Handsontable</title>
|
|
|
|
<!--
|
|
Loading Handsontable (full distribution that includes all dependencies)
|
|
-->
|
|
<link data-jsfiddle="common" rel="stylesheet" media="screen" href="../dist/handsontable.full.css">
|
|
<script data-jsfiddle="common" src="../dist/handsontable.full.js"></script>
|
|
|
|
<!--
|
|
Loading demo dependencies. They are used here only to enhance the examples on this page
|
|
-->
|
|
<link data-jsfiddle="common" rel="stylesheet" media="screen" href="css/samples.css?20140331">
|
|
<script src="js/samples.js"></script>
|
|
<script src="js/highlight/highlight.pack.js"></script>
|
|
<link rel="stylesheet" media="screen" href="js/highlight/styles/github.css">
|
|
<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">
|
|
|
|
<!--
|
|
Facebook open graph. Don't copy this to your project :)
|
|
-->
|
|
<meta property="og:title" content="Grouping and ungrouping of rows and columns">
|
|
<meta property="og:description"
|
|
content=".">
|
|
<meta property="og:url" content="http://handsontable.com/demo/grouping.html">
|
|
<meta property="og:image" content="http://handsontable.com/demo/image/og-image.png">
|
|
<meta property="og:image:type" content="image/png">
|
|
<meta property="og:image:width" content="409">
|
|
<meta property="og:image:height" content="164">
|
|
<link rel="canonical" href="http://handsontable.com/demo/grouping.html">
|
|
|
|
<!--
|
|
Google Analytics for GitHub Page. Don't copy this to your project :)
|
|
-->
|
|
<script src="js/ga.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<div class="wrapper">
|
|
<div class="wrapper-row">
|
|
<div id="global-menu-clone">
|
|
<h1><a href="../index.html">Handsontable</a></h1>
|
|
</div>
|
|
|
|
<div id="container">
|
|
<div class="columnLayout">
|
|
|
|
<div class="rowLayout">
|
|
<div class="descLayout">
|
|
<div class="pad" data-jsfiddle="example1">
|
|
<h2>Grouping & ungrouping of rows and columns</h2>
|
|
<a name="groupsArray"></a>
|
|
<p>To enable this feature, use settings <code>groups: true</code></p>
|
|
<p>It's also possible to define groups as a array<code>groups:[]</code></p>
|
|
|
|
<div id="example1" style="width: 400px; height: 300px; overflow: hidden;"></div>
|
|
<p>
|
|
<button name="dump" data-instance="hot" data-dump="#example1" title="Prints current data source to Firebug/Chrome Dev Tools">
|
|
Dump
|
|
data to console
|
|
</button>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="codeLayout">
|
|
<div class="pad">
|
|
<div class="jsFiddle">
|
|
<button class="jsFiddleLink" data-runfiddle="example1">Edit in jsFiddle</button>
|
|
</div>
|
|
|
|
<script data-jsfiddle="example1">
|
|
var example1 = document.getElementById('example1'),
|
|
settings,
|
|
hot;
|
|
|
|
settings = {
|
|
data: Handsontable.helper.createSpreadsheetData(1000, 10),
|
|
rowHeaders: true,
|
|
colHeaders: true,
|
|
contextMenu: true,
|
|
groups: [
|
|
{
|
|
cols: [0, 2]
|
|
},
|
|
{
|
|
cols: [3, 7]
|
|
},
|
|
{
|
|
cols: [5, 7]
|
|
},
|
|
{
|
|
rows: [0, 4]
|
|
},
|
|
{
|
|
rows: [5, 7]
|
|
},
|
|
{
|
|
rows: [2, 4]
|
|
}
|
|
]
|
|
};
|
|
hot = new Handsontable(example1, settings);
|
|
</script>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="footer-text">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outside-links-wrapper"></div>
|
|
|
|
</body>
|
|
</html>
|