<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"utf-8"
/>
<
title
>1 Million Rows Demo</
title
>
<
link
id
=
"themecss"
rel
=
"stylesheet"
type
=
"text/css"
href
=
"//www.shieldui.com/shared/components/latest/css/light/all.min.css"
/>
<
script
type
=
"text/javascript"
src
=
"//www.shieldui.com/shared/components/latest/js/jquery-1.11.1.min.js"
>
</
script
>
<
script
type
=
"text/javascript"
src
=
"//www.shieldui.com/shared/components/latest/js/shieldui-all.min.js"
>
</
script
>
</
head
>
<
body
class
=
"theme-light"
>
<
div
id
=
"grid"
style
=
"margin-bottom: -500px;"
></
div
>
<
script
type
=
"text/javascript"
>
$(function() {
var grid = new shield.DataSource({
remote: {
operations: ["skip", "take"],
read: function(params, success, error) {
var skip = grid.skip || 0,
take = grid.take || 20,
data = [],
k = 96;
for (var i = skip; i <
skip
+ take; i++) {
k++;
var row = {};
for (var
j
=
1
; j < 3; j++) {
row["Counting"] = i + 1;
if (k == 123)
k
=
97
;
var
string
=
String
.fromCharCode(k);
row["Alphabets"] = string;
}
data.push(row);
}
success({
data: data,
total: 1000000
});
}
},
schema: {
data: "data",
total: "total"
}
});
$("#grid").shieldGrid({
dataSource: grid,
height: 400,
scrolling: {
virtual: true
},
columns: (function() {
var cols = [];
cols.push({
field: "Counting",
width: 140
});
cols.push({
field: "Alphabets",
width: 140
});
return cols;
})()
});
});
</script>
</
body
>
</
html
>