My KoGrid
by Rob Bowman
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js"></script>
<script src="http://biztalkers.com/cdn/kogrid-2.1.1.debug.js"></script>
<div id="wrapper" data-bind="koGrid:{data:myObsArray}"></div>
CSS
#wrapper{
height:800px;
}
/******** Grid Global ********/
.kglabel {
display: block;
float: left;
font-weight: bold;
padding-right: 5px;
}
.kgNoSelect{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/******** Grid ********/
.koGrid{
background-color: rgb(253, 253, 253);
}
/******** Header ********/
.kgGroupPanel{
background-color: rgb(234, 234, 234);
overflow: hidden;
border-bottom: 1px solid rgb(212,212,212);
}
.kgGroupPanelDescription{
margin-top: 5px;
margin-left: 5px;
}
.kgGroupList {
list-style-type: none;
margin: 0;
padding: 0;
}
.kgGroupItem {
float: left;
}
.kgGroupElement {
float: left;
height: 100%;
width: 100%;
}
.kgGroupName {
background-color: rgb(247,247,247);
border: 1px solid rgb(212,212,212);
padding: 3px 10px;
float: left;
margin-left: 0;
margin-top: 2px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
font-weight: bold;
}
.kgGroupItem:first-child{
margin-left: 2px;
}
.kgRemoveGroup {
width: 5px;
float: right;
-moz-opacity: 0.4;
opacity: 0.4;
margin-top: -1px;
margin-left: 5px;
}
.kgRemoveGroup:hover {
color: black;
text-decoration: none;
cursor: pointer;
-moz-opacity: 0.7;
opacity: 0.7;
}
.kgGroupArrow {
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 6px solid black;
margin-top: 10px;
margin-left: 5px;
margin-right: 5px;
float: right;
}
.kgTopPanel {
position: relative;
background-color: rgb(234, 234, 234);
border-bottom: 1px solid rgb(212,212,212);
z-index: 5;
}
.kgHeaderContainer {
position: relative;
overflow: hidden;
font-weight: bold;
}
.kgHeaderScroller {
position:absolute;
}
.kgHeaderSortColumn{
position:absolute;
overflow:...
JavaScript
var data = [
{ From: 'N.E. Florida General Health', Subject: 'Account Reminder - Stacy Lewis', Received: '3/12/2013' },
{ From: 'Principal Care Shield', Subject: 'Payment Made to - Goethals Pediatrics', Received: '3/12/2013' },
{ From: 'N.E. Florida General Health', Subject: 'Provider Statment - Stacy Lewis', Received: '3/10/2013' },
{ From: 'Gorgus Sports Medicine', Subject: 'Provider Statement - Herschel Lewis', Received: '3/10/2013' },
{ From: 'Goethals Pediatrics', Subject: 'Lab Test Results - Megan Lewis', Received: '3/9/2013' },
{ From: 'Goethals Pediatrics', Subject: 'School Physical Copy - Paul Lewis', Received: '3/9/2013' },
{ From: 'Goethals Pediatrics', Subject: 'School Physical Copy - Megan Lewis', Received: '3/9/2013' },
{ From: 'Principal Care Shield', Subject: 'Account Reminder - Stacy Lewis', Received: '3/8/2013' },
{ From: 'N.E. Florida General Health', Subject: 'Account Reminder - Stacy Lewis', Received: '3/8/2013' },
{ From: 'Principal Care Shield', Subject: 'Payment Made to - Goethals Pediatrics', Received: '3/8/2013' },
{ From: 'N.E. Florida General Health', Subject: 'Provider Statment - Stacy Lewis', Received: '3/8/2013' },
{ From: 'Gorgus Sports Medicine', Subject: 'Provider Statement - Herschel Lewis', Received: '2/2/2013' },
{ From: 'Goethals Pediatrics', Subject: 'Lab Test Results - Megan Lewis', Received: '1/12/2013' },
{ From: 'Goethals Pediatrics', Subject: 'School Physical Copy - Paul Lewis', Received: '1/12/2013' },
{ From: 'Goethals Pediatrics', Subject: 'School Physical Copy - Megan Lewis', Received: '1/12/2013' },
{ From: 'Principal Care Shield', Subject: 'Account Reminder - Stacy Lewis', Received: '12/12/2012' },
{ From: 'N.E. Florida General Health', Subject: 'Account Reminder - Stacy Lewis', Received: '12/12/2012' },
{ From: 'Principal Care Shield', Subject: 'Payment Made to - Goethals...