master
editor 1 year ago
commit b111a6b83c

@ -0,0 +1,39 @@
JSGRID网格数据源码
JSGrid网格数据源码
源码描述:
主要特点:
1自己的滚动条允许你加载记录将被显示你可以用它来代替分页。
2要自定义的渲染你可以订阅相应的绘制事件的处理程序。您可以深入自定义外观几乎所有可见的网格元素如行单元格列标题等等所有这些都相应的* CustomDraw的事件使您可以编辑HTML元素的某些电网的一部分。它为您提供了一个可能性
 a显示奇行不同的风格。
 b油漆行/单元格的数据/数字的单元格的背景/前景。
 c自定义文本格式。
 d根据你的规则将自己的HTML元素S进入细胞。例如您可以显示布尔数据与单选按钮组。
3丰富的JavaScript API
4适用于IE浏览器火狐谷歌ChromeSafari和Opera浏览器。
作者: vol_bob
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/JSGrid
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,15 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6470B16C-E650-49F9-A924-076556ED53E2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Grid</RootNamespace>
<AssemblyName>Grid</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

@ -0,0 +1,15 @@
var Body = Class.create();
Body.prototype = {
initialize: function(grid) {
this.grid = grid;
this.mainTable = grid.mainTable;
this.bodyRows = new Array();
this.cellClass = '';
this.alterRowClass = '';
},
createBody: function() {
var leafColumns = this.grid.leafColumns();
var countOfRowsInBody = this.grid.displayRowsCount;

@ -0,0 +1,15 @@
// script.aculo.us builder.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
var Builder = {
NODEMAP: {
AREA: 'map',
CAPTION: 'table',
COL: 'table',
COLGROUP: 'table',
LEGEND: 'fieldset',
OPTGROUP: 'select',

@ -0,0 +1,15 @@
var SORT_ORDER_ASCENDING = "ASC";
var SORT_ORDER_DESCENDING = "DESC";
var Column = Class.create();
Column.prototype = {
initialize: function(args) {
this.title = args.title;
this.sourceColumnsName = args.data;
this.width = args.width;
this.enableSort = '';
this.subColumns = new Array();
this.cell = null;
this.grid = null;
this.sortDirection = null;

@ -0,0 +1,15 @@
var MapEntry = Class.create();
MapEntry.prototype = {
initialize: function(obj, func) {
this.obj = obj;
this.func = func;
}
}
var MulticastDelegate = Class.create();
MulticastDelegate.prototype = {
initialize: function() {
this.handlers = new Array();
},

@ -0,0 +1,7 @@
var Footer = Class.create();
Footer.prototype = {
initialize: function(grid) {
}
}

@ -0,0 +1,15 @@
var Grid = Class.create();
Grid.prototype = {
initialize: function(args) {
this.parent = args.host;
this.mainTable = null;
this.columns = new Array();
this.header = null;
this.body = null;
this.footer = null;
this.tableStyle = '';
this.displayRowsCount = 5;
this.totalRowsCount = 5;
this.orderByColumn = null;

@ -0,0 +1,15 @@
var Header = Class.create();
Header.prototype = {
initialize: function(grid) {
this.grid = grid;
this.mainTable = grid.mainTable;
this.headerRows = new Array();
this.rowNumberCell = null;
this.cellClass = '';
this.visible = true;
},
clearView: function() {
for(var i = this.headerRows.length - 1; i >= 0; i--) {

@ -0,0 +1,15 @@
/* Prototype JavaScript framework, version 1.6.1
* (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/
var Prototype = {
Version: '1.6.1',
Browser: (function(){
var ua = navigator.userAgent;
var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
return {

@ -0,0 +1,15 @@
function deleteRow(table, row) {
for(var i = 0; i < table.rows.length; i++) {
if(table.rows[i] == row) {
//var delRow = table.rows[i + 1];
table.deleteRow(i);
return;
}
}
}
function isTableOvner(table, element) {
for(var i = 0; i < table.rows.length; i++) {
if(table.rows[i] == element)
return true;

@ -0,0 +1,15 @@
var UP_IMAGE = 'Up.bmp';
var DOWN_IMAGE = 'Down.bmp';
var EMPTY_SCROLL_BG = 'EmptyScrollBg.bmp';
var SCROLL_BG = 'ScrollBg.bmp';
var SCROLL_BG_CATCH = 'ScrollBgCatch.bmp';
var SCROLL_BG_START = 'ScrollBgStart.bmp';
var SCROLL_BG_END = 'ScrollBgEnd.bmp';
var UP_IMAGE_DIS = 'UpDis.bmp';
var DOWN_IMAGE_DIS = 'DownDis.bmp';
var UP_DOWN_IMAGE_HEIGHT = 7;
var MOVABLE_TOP_BOTTOM_IMAGE_HEIGHT = 3;
var MOVABLE_CATCH_IMAGE_HEIGHT = 6;
var IMAGES_WIDTH = 8;

@ -0,0 +1,15 @@
.TableStyle
{
border-collapse:collapse;
border:0 solid Black;
}
.BodyCellStyle
{
border-collapse:collapse;
border:1px solid Black;
}
.HeaderCallStyle
{
border-collapse:collapse;

@ -0,0 +1,15 @@
.Header_RedWine
{
border-right: #8a0a37 1px solid;
padding-right: 5px;
background-position: 50% top;
border-top: #8a0a37 1px solid;
padding-left: 5px;
background-image: url(gvHeaderBackground.gif);
padding-bottom: 5px;
overflow: hidden;
border-left: #8a0a37 1px solid;
cursor: pointer;
padding-top: 5px;
border-bottom: #8a0a37 1px solid;
background-repeat: repeat-x;

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<script type="text/javascript" language="javascript" src="Scripts/prototype.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/builder.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/tableScroll.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/eventManager.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/grid.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/footer.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/column.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/header.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/body.js"></script>

@ -0,0 +1,15 @@
var data =
[
$H({ "FirstName": "David", "SecondName": "Flanagan", "Book": "JavaScript: The Definitive Guide", "Price": 31.49, "OldPrice": 49.99, "InStock": true }),
$H({ "FirstName": "Douglas", "SecondName": "Crockford", "Book": "JavaScript: The Good Parts", "Price": 19.79, "OldPrice": 29.99, "InStock": false }),
$H({ "FirstName": "John", "SecondName": "Pollock", "Book": "JavaScript, A Beginner's Guide, Third Edition (Beginner's Guide (Osborne Mcgraw Hill))", "Price":26.39 , "OldPrice":39.99 , "InStock":false }),
$H({ "FirstName": "David", "SecondName": "Sawyer", "Book": "JavaScript: The Missing Manual", "Price": 26.39, "OldPrice": 39.99 , "InStock": false }),
$H({ "FirstName": "Nicholas", "SecondName": "Zakas", "Book": "Professional JavaScript for Web Developers (Wrox Programmer to Programmer)", "Price": 31.49, "OldPrice": 49.99, "InStock": false }),
$H({ "FirstName": "Michael", "SecondName": "Morrison", "Book": "Head First JavaScript", "Price": 26.39, "OldPrice": 39.99, "InStock": false }),
$H({ "FirstName": "Ray", "SecondName": "Harris", "Book": "Murach's JavaScript and DOM Scripting (Murach: Training & Reference)", "Price": 34.34, "OldPrice": 54.50, "InStock": false }),
$H({ "FirstName": "Stoyan", "SecondName": "Stefanov", "Book": "Object-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications and libraries", "Price": 31.57, "OldPrice": 39.99, "InStock": true }),
$H({ "FirstName": "Steve", "SecondName": "Suehring", "Book": "JavaScript(TM) Step by Step", "Price": 26.39, "OldPrice": 39.99, "InStock": true }),
$H({ "FirstName": "Shelley", "SecondName": "Powers", "Book": "Learning JavaScript, 2nd Edition", "Price": 23.09, "OldPrice": 34.99, "InStock": true }),
$H({ "FirstName": "James", "SecondName": "Keogh", "Book": "JavaScript Demystified", "Price": 14.93, "OldPrice": 21.95, "InStock": false }),
$H({ "FirstName": "John", "SecondName": "Resig", "Book": "Pro JavaScript Techniques", "Price": 32.03, "OldPrice": 44.99, "InStock": true}),
$H({ "FirstName": "Danny", "SecondName": "Goodman", "Book": "JavaScript & DHTML Cookbook (2nd edition)", "Price": 29.69, "OldPrice": 44.99, "InStock": true }),

@ -0,0 +1,15 @@
var stockFilter = 'All';
function UpdateGridData() {
var filteredData = new Array();
for (var i = 0; i < data.length; i++) {
if (stockFilter == 'Yes' && !data[i].get('InStock'))
continue;
if (stockFilter == 'No' && data[i].get('InStock'))
continue;
filteredData.push(data[i]);
}

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript" language="javascript" src="Scripts/prototype.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/builder.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/builder.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/tableRoutine.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/eventManager.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/tableScroll.js"></script>
<title>Scroll Test</title>
</head>
<body>
<table id="ScrolledTable">
<thead>
<tr>

@ -0,0 +1,15 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6470B16C-E650-49F9-A924-076556ED53E2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Grid</RootNamespace>
<AssemblyName>Grid</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>

@ -0,0 +1,15 @@
var MapEntry = Class.create();
MapEntry.prototype = {
initialize: function(obj, func) {
this.obj = obj;
this.func = func;
}
}
var MulticastDelegate = Class.create();
MulticastDelegate.prototype = {
initialize: function() {
this.handlers = new Array();
},

@ -0,0 +1,15 @@
var Body = Class.create();
Body.prototype = {
initialize: function(grid) {
this.grid = grid;
this.mainTable = grid.mainTable;
this.bodyRows = new Array();
this.cellClass = '';
this.alterRowClass = '';
},
createBody: function() {
var leafColumns = this.grid.leafColumns();
var countOfRowsInBody = this.grid.displayRowsCount;

@ -0,0 +1,15 @@
// script.aculo.us builder.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
var Builder = {
NODEMAP: {
AREA: 'map',
CAPTION: 'table',
COL: 'table',
COLGROUP: 'table',
LEGEND: 'fieldset',
OPTGROUP: 'select',

@ -0,0 +1,15 @@
var SORT_ORDER_ASCENDING = "ASC";
var SORT_ORDER_DESCENDING = "DESC";
var Column = Class.create();
Column.prototype = {
initialize: function(args) {
this.title = args.title;
this.sourceColumnsName = args.data;
this.width = args.width;
this.enableSort = '';
this.subColumns = new Array();
this.cell = null;
this.grid = null;
this.sortDirection = null;

@ -0,0 +1,7 @@
var Footer = Class.create();
Footer.prototype = {
initialize: function(grid) {
}
}

@ -0,0 +1,15 @@
var Grid = Class.create();
Grid.prototype = {
initialize: function(args) {
this.parent = args.host;
this.mainTable = null;
this.columns = new Array();
this.header = null;
this.body = null;
this.footer = null;
this.tableStyle = '';
this.displayRowsCount = 5;
this.totalRowsCount = 5;
this.orderByColumn = null;

@ -0,0 +1,15 @@
var Header = Class.create();
Header.prototype = {
initialize: function(grid) {
this.grid = grid;
this.mainTable = grid.mainTable;
this.headerRows = new Array();
this.rowNumberCell = null;
this.cellClass = '';
this.visible = true;
},
clearView: function() {
for(var i = this.headerRows.length - 1; i >= 0; i--) {

@ -0,0 +1,15 @@
/* Prototype JavaScript framework, version 1.6.1
* (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/
var Prototype = {
Version: '1.6.1',
Browser: (function(){
var ua = navigator.userAgent;
var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
return {

@ -0,0 +1,15 @@
function deleteRow(table, row) {
for(var i = 0; i < table.rows.length; i++) {
if(table.rows[i] == row) {
//var delRow = table.rows[i + 1];
table.deleteRow(i);
return;
}
}
}
function isTableOvner(table, element) {
for(var i = 0; i < table.rows.length; i++) {
if(table.rows[i] == element)
return true;

@ -0,0 +1,15 @@
var UP_IMAGE = 'Up.bmp';
var DOWN_IMAGE = 'Down.bmp';
var EMPTY_SCROLL_BG = 'EmptyScrollBg.bmp';
var SCROLL_BG = 'ScrollBg.bmp';
var SCROLL_BG_CATCH = 'ScrollBgCatch.bmp';
var SCROLL_BG_START = 'ScrollBgStart.bmp';
var SCROLL_BG_END = 'ScrollBgEnd.bmp';
var UP_IMAGE_DIS = 'UpDis.bmp';
var DOWN_IMAGE_DIS = 'DownDis.bmp';
var UP_DOWN_IMAGE_HEIGHT = 7;
var MOVABLE_TOP_BOTTOM_IMAGE_HEIGHT = 3;
var MOVABLE_CATCH_IMAGE_HEIGHT = 6;
var IMAGES_WIDTH = 8;

@ -0,0 +1,15 @@
.TableStyle
{
border-collapse:collapse;
border:0 solid Black;
}
.BodyCellStyle
{
border-collapse:collapse;
border:1px solid Black;
}
.HeaderCallStyle
{
border-collapse:collapse;

@ -0,0 +1,15 @@
.Header_RedWine
{
border-right: #8a0a37 1px solid;
padding-right: 5px;
background-position: 50% top;
border-top: #8a0a37 1px solid;
padding-left: 5px;
background-image: url(gvHeaderBackground.gif);
padding-bottom: 5px;
overflow: hidden;
border-left: #8a0a37 1px solid;
cursor: pointer;
padding-top: 5px;
border-bottom: #8a0a37 1px solid;
background-repeat: repeat-x;

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<script type="text/javascript" language="javascript" src="Scripts/prototype.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/builder.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/tableScroll.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/eventManager.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/grid.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/footer.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/column.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/header.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/body.js"></script>

@ -0,0 +1,15 @@
var data =
[
$H({ "FirstName": "David", "SecondName": "Flanagan", "Book": "JavaScript: The Definitive Guide", "Price": 31.49, "OldPrice": 49.99, "InStock": true }),
$H({ "FirstName": "Douglas", "SecondName": "Crockford", "Book": "JavaScript: The Good Parts", "Price": 19.79, "OldPrice": 29.99, "InStock": false }),
$H({ "FirstName": "John", "SecondName": "Pollock", "Book": "JavaScript, A Beginner's Guide, Third Edition (Beginner's Guide (Osborne Mcgraw Hill))", "Price":26.39 , "OldPrice":39.99 , "InStock":false }),
$H({ "FirstName": "David", "SecondName": "Sawyer", "Book": "JavaScript: The Missing Manual", "Price": 26.39, "OldPrice": 39.99 , "InStock": false }),
$H({ "FirstName": "Nicholas", "SecondName": "Zakas", "Book": "Professional JavaScript for Web Developers (Wrox Programmer to Programmer)", "Price": 31.49, "OldPrice": 49.99, "InStock": false }),
$H({ "FirstName": "Michael", "SecondName": "Morrison", "Book": "Head First JavaScript", "Price": 26.39, "OldPrice": 39.99, "InStock": false }),
$H({ "FirstName": "Ray", "SecondName": "Harris", "Book": "Murach's JavaScript and DOM Scripting (Murach: Training & Reference)", "Price": 34.34, "OldPrice": 54.50, "InStock": false }),
$H({ "FirstName": "Stoyan", "SecondName": "Stefanov", "Book": "Object-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications and libraries", "Price": 31.57, "OldPrice": 39.99, "InStock": true }),
$H({ "FirstName": "Steve", "SecondName": "Suehring", "Book": "JavaScript(TM) Step by Step", "Price": 26.39, "OldPrice": 39.99, "InStock": true }),
$H({ "FirstName": "Shelley", "SecondName": "Powers", "Book": "Learning JavaScript, 2nd Edition", "Price": 23.09, "OldPrice": 34.99, "InStock": true }),
$H({ "FirstName": "James", "SecondName": "Keogh", "Book": "JavaScript Demystified", "Price": 14.93, "OldPrice": 21.95, "InStock": false }),
$H({ "FirstName": "John", "SecondName": "Resig", "Book": "Pro JavaScript Techniques", "Price": 32.03, "OldPrice": 44.99, "InStock": true}),
$H({ "FirstName": "Danny", "SecondName": "Goodman", "Book": "JavaScript & DHTML Cookbook (2nd edition)", "Price": 29.69, "OldPrice": 44.99, "InStock": true }),

@ -0,0 +1,15 @@
var stockFilter = 'All';
function UpdateGridData() {
var filteredData = new Array();
for (var i = 0; i < data.length; i++) {
if (stockFilter == 'Yes' && !data[i].get('InStock'))
continue;
if (stockFilter == 'No' && data[i].get('InStock'))
continue;
filteredData.push(data[i]);
}

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript" language="javascript" src="Scripts/prototype.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/builder.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/builder.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/tableRoutine.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/eventManager.js"></script>
<script type="text/javascript" language="javascript" src="Scripts/tableScroll.js"></script>
<title>Scroll Test</title>
</head>
<body>
<table id="ScrolledTable">
<thead>
<tr>

@ -0,0 +1,15 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="ConversionReport0">
Migration Report
</title><style>
/* Body style, for the entire document */
body
{
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}
Loading…
Cancel
Save