working jqGrid Example
HTML
<script src="http://trirand.com/blog/jqgrid/js/jquery.jqGrid.min.js"></script>
<table id="tableToLoad"></table>
CSS
.ui-jqgrid tr.jqgrow td {
font-weight: normal;
overflow: hidden;
white-space: pre;
height: 22px;
padding: 0 2px 0 2px;
border-bottom-width: 1px;
border-bottom-color: inherit;
border-bottom-style: solid;
/* background-color:#D3D3D3; */
}
.ui-jqgrid tr.jqgfirstrow td {
padding: 0 2px 0 2px;
border-right-width: 1px;
border-right-style: solid;
}
.ui-jqgrid .ui-jqgrid-sortable {
cursor:pointer;
background-color:#b0c4de;
}
* {
padding:0;
margin:0;
<!--Width: 100%; -->
}
#fred {
Width: 100%;
}
.ul {
Width: 100%;
}
.tabs li {
list-style:none;
display:inline;
}
.tabs a {
<!--padding:5px 5px;-->
display:inline-block;
background:#fff;
color:#000;
text-decoration:none;
}
.tabs a.active {
background:#666;
color:#fff;
}
JavaScript
/* Split Hierarchically on Unit */
var x = {
"d": {
"dataReturned": [{
"unit_subject":
"Language Arts",
"unit_name": "Spelling",
"sname": "Dennis Miller",
"ts_st_id": 184321,
"st_grade": 5,
"TestSessions": 1
}, {
"unit_subject": "Mathematics",
"unit_name": "Algebra, Patterns, and Relationships",
"sname": "Bobby Celloo",
"ts_st_id": 184319,
"st_grade": 6,
"TestSessions": 7
}, {
"unit_subject": "Mathematics",
"unit_name": "Algebra, Patterns, and Relationships",
"sname": "Carmen Miranda",
"ts_st_id": 184320,
"st_grade": 6,
"TestSessions": 7
}, {
"unit_subject": "Mathematics",
"unit_name": "Algebra, Patterns, and Relationships",
"sname": "Dennis Miller",
"ts_st_id": 184321,
"st_grade": 5,
"TestSessions": 7
}, {
"unit_subject": "Mathematics",
"unit_name": "Algebra, Patterns, and Relationships",
"sname": "Frog Man",
"ts_st_id": 184318,
"st_grade": 5,
"TestSessions": 7
}, {
"unit_subject": "Mathematics",
"unit_name": "Algebra, Patterns, and Relationships",
"sname": "Sandra Dee",
"ts_st_id": 184330,
"st_grade": 3,
"TestSessions": 7
}, {
"unit_subject": "Mathematics",
"unit_name": "Data, Statistics, and Probability",
"sname": "Frog Man",
"ts_st_id": 184318,
"st_grade": 5,
"TestSessions": 1
}, {
"unit_subject": "Mathematics",
...