加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

dojo grid 组件

发布时间:2020-12-16 21:46:55 所属栏目:百科 来源:网络整理
导读:dojo的grid组件,其功能还是很强大的,我主要用到两种方式: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"htmlheadtitleTest dojox.grid.DataGrid Basic Editing/titlemeta http-equiv="Content-

dojo的grid组件,其功能还是很强大的,我主要用到两种方式:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Test dojox.grid.DataGrid Basic Editing</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../resources/Grid.css";
		@import "../resources/tundraGrid.css";
		body {
			font-size: 0.9em;
			font-family: Geneva,Arial,Helvetica,sans-serif;
		}
		.heading {
			font-weight: bold;
			padding-bottom: 0.25em;
		}
		#grid,#grid2 {
			width: 65em;
			height: 25em;
			padding: 1px;
		}
	</style>
	<script>
	//定义grid的结构
	ModelGridLayout = [{ 
 		cells: [ 
 				{ name:'<div style=" float:left;width:20px;height:20px;">second</div>',field: 'name',editable: true,width: '300px',cellStyles: 'text-decoration: none; cursor:default; ',headerStyles: 'text-align: center;' },{ name:'first',field: 'area',width: 'auto',headerStyles: 'text-align: center;'},],}]; 
	</script>
	
	<script type="text/javascript" src="../../../dojo/dojo.js" 
		djConfig="isDebug:true,parSEOnLoad: true">

		</script>
	<script type="text/javascript">
		dojo.require("dijit.dijit");
		dojo.require("dojox.grid.DataGrid");
		dojo.require("dojo.data.ItemFileWriteStore");
		dojo.require("dojo.parser");
	</script>

	<script type="text/javascript" src="support/test_data.js"></script>
</head>
<body class="tundra">
	<div class="heading">dojox.grid.DataGrid Basic Editing Test</div>
	<span dojoType="dojo.data.ItemFileWriteStore" 
		jsId="jsonStore" url="../../../dijit/tests/_data/countries.json">
	</span>
	<table dojoType="dojox.grid.DataGrid"
		jsid="grid" id="grid" 
		store="jsonStore" query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
		<thead>
			<tr>
				<th field="name" width="300px">Country/Continent Name</th>
				<th field="type" width="auto" cellType="dojox.grid.cells.Select"  options="country,city,continent" editable="true">Type</th>
			</tr>
		</thead>
	</table>

	<div dojoType="dojox.grid.DataGrid"
		jsid="grid1" id="grid1" 
		store="jsonStore" query="{ name: '*' }" style="width:800px" structure=ModelGridLayout rowSelector="20px"></div>
	
</body>
</html>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读