论坛首页 Web前端技术论坛

[发布]GT-Grid 1.18版 & "前后台结合示例"更新 ★2008-09-12发布

浏览 12513 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-09-19  
对于报表[img][/img]
  • 大小: 30.3 KB
0 请登录后投票
   发表时间:2008-09-19  
我把他们企业的版面全部升级成GT-grid(以前没用任何控件,就是html),然后我发布后,在企业调查了,他们普遍认为:外观样式操作上比以前好都了,同时我们开发时候也省了很多代码,因为他们主要多来对帐,所有首先关注的速度(如果能提高速度那就很好了,有什么办法吗)
⑴速度没以前快⑵当一列显示不完时候,显示的是....,当去拉动的时候数据量大了就会死掉,能不能一行固定,字数多了就显示到下一排,这样就可以不用拉动(主要针对表头)(3)过滤也是同样问题,数据大的时候,每过滤一次速度很慢(4)锁定列也是速度问题;
  • 大小: 28.3 KB
0 请登录后投票
   发表时间:2008-09-19  
关于分页的一点疑问:
dsConfig中的data是我生成的数据,同时也有分页信息(pageInfo),为何我页面显示的menu中不是我pageInfo中的信息呢?
<script type="text/javascript">
<!--
	var dsConfig= {
		pageInfo:{endRowNum:0,totalRowNum:490503,totalPageNum:2453,startRowNum:0,pageSize:200,pageNum:1000},
		data:[
				{"nextgwh":"i-01","serialid":200740,"zh":"63036","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062652"},
				{"nextgwh":"x-01","serialid":200741,"zh":"61174","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"h-01","lx":"","mczzrq":"","mczzdw":"","gh":" 李国","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062619"},
				{"nextgwh":"h-01","serialid":200742,"zh":"56401","work_date":"2007-06-30","srrq":"2007-06-29","flag":"0","curgwh":"h-01","lx":"","mczzrq":"","mczzdw":"","gh":" 李国","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062984"},
				{"nextgwh":"i-01","serialid":200743,"zh":"61683","work_date":"2007-06-30","srrq":"2007-06-29","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062956"},
				{"nextgwh":"i-01","serialid":200744,"zh":"60820","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062608"},
				{"nextgwh":"i-01","serialid":200745,"zh":"60280","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062587"},
				{"nextgwh":"i-01","serialid":200746,"zh":"61377","work_date":"2007-06-30","srrq":"2007-06-29","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062943"},
				{"nextgwh":"i-01","serialid":200747,"zh":"61139","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062618"},
				{"nextgwh":"i-01","serialid":200748,"zh":"57685","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062558"},
				{"nextgwh":"o-01","serialid":200749,"zh":"57240","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"e-02","lx":"","mczzrq":"","mczzdw":"","gh":"齐卉","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062549"},
				{"nextgwh":"o-01","serialid":200750,"zh":"60696","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"e-02","lx":"","mczzrq":"","mczzdw":"","gh":"齐卉","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062602"},
				{"nextgwh":"i-01","serialid":200751,"zh":"60510","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"x-02","lx":"","mczzrq":"","mczzdw":"","gh":"王玲","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062591"},
				{"nextgwh":"o-01","serialid":200752,"zh":"61736","work_date":"2007-06-30","srrq":"2007-06-29","flag":"0","curgwh":"e-02","lx":"","mczzrq":"","mczzdw":"","gh":"齐卉","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062959"},
				{"nextgwh":"o-01","serialid":200753,"zh":"60622","work_date":"2007-06-30","srrq":"2007-06-23","flag":"0","curgwh":"e-02","lx":"","mczzrq":"","mczzdw":"","gh":"齐卉","fxyy":"","sfwc":"1","clbj":"","zx":"RE2B","dh":"13107062688"}
			],
		fields :[
			{name:'serialid',type:'int'},
			{name:'zh'},
			{name:'dh'},
			{name:'srrq',type:'string'},
			{name:'mczzrq'},
			{name:'mczzdw'},
			{name:'clbj'},
			{name:'zx'},
			{name:'lx'},
			{name:'gh'},
			{name:'curgwh'},
			{name:'nextgwh'},
			{name:'sfwc'},
			{name:'flag'},
			{name:'work_date'},
			{name:'fxyy'}
		]
	};

	var colsConfig = [
			{id: 'chk' ,isCheckColumn : true, _checkType:'radio', 	frozen : true , filterable : false, header: "", title: '请选择', fieldName : 'no'}, 
			{id:'serialid',header:'序号',width:40},
			{id:'zh',header:'轴号',width:60},
			{id:'dh',header:'单号',width:90},
			{id:'srrq',header:'收入日期'},
			{id:'mczzrq',header:'日期'},
			{id:'mczzdw',header:'单位'},
			{id:'clbj',header:'标识'},
			{id:'zx',header:'轴型'},
			{id:'lx',header:'轮型'},
			{id:'gh',header:'工号'},
			{id:'curgwh',header:'当前工位'},
			{id:'nextgwh',header:'下一个工位'},
			{id:'sfwc',header:'是否完成',renderer : GT.Grid.mappingRenderer( { '0':'未完工', '1':'已完工'} , '未知' )},
			{id:'flag',header:'FLAG',renderer : GT.Grid.mappingRenderer( { '0':'货车', '1':'客车'} , '未知' )},
			{id:'work_date',header:'工作日期'},
			{id:'fxyy',header:'返修原因'}
	];

	var gridConfig={
	
		id : "grid1",
		dataset : dsConfig ,
		columns : colsConfig ,
		container : 'grid1_container', 
		toolbarPosition : 'bottom',
		
		toolbarContent : 'nav | goto | pagesize | reload | state' ,
		pageSize : 20 ,	
		pageSizeList : [5,10,15,20,100,200],
		remotePaging:false,
		showGridMenu : true,
		allowCustomSkin : true,
		resizable : true,
		allowGroup : true
	};
	
	var mygrid=new GT.Grid( gridConfig );
	
	GT.U.onLoad( GT.Grid.render(mygrid) );
//-->
</script>
0 请登录后投票
   发表时间:2008-09-19  
能否隐藏数据列?
0 请登录后投票
   发表时间:2008-09-20  

hideable属性 {b} 列是否可隐藏
0 请登录后投票
   发表时间:2008-09-24  
楼主请教两个个问题,1 我现在想双击某行数据,然后弹出一个某行数据的详细窗口。我在
onDblClickCell中写代码,但经常没反映,写到onClickCell就行。我表格是可以编辑的。
2 里面内置的日期校验,能否自定义日期格式,比如MM/dd/YYYY或者YYYY-MM-DD?
0 请登录后投票
   发表时间:2008-09-25  
再此麻烦一下,呵呵,我现在表格中有多列,现在希望某些列比如只读列颜色和其它列不一样,这个怎么修改?修改CSS还是用render?
0 请登录后投票
   发表时间:2008-09-25  
还能够像ECSide2.0一样,导出xls,pdf吗?
0 请登录后投票
   发表时间:2008-09-25  
wsbjwjt 写道

还能够像ECSide2.0一样,导出xls,pdf吗?

目前不支持 以后会支持



pollipop 写道

关于分页的一点疑问:dsConfig中的data是我生成的数据,同时也有分页信息(pageInfo),为何我页面显示的menu中不是我pageInfo中的信息呢?


这是一个bug 下一版本会修正
darkingPB 写道

再此麻烦一下,呵呵,我现在表格中有多列,现在希望某些列比如只读列颜色和其它列不一样,这个怎么修改?修改CSS还是用render?


目前只能通过render来做 而且现在不支持对列表的td进行自定义

tangrenzhong116 写道

我把他们企业的版面全部升级成GT-grid(以前没用任何控件,就是html),然后我发布后,在企业调查了,他们普遍认为:外观样式操作上比以前好都了,同时我们开发时候也省了很多代码,因为他们主要多来对帐,所有首先关注的速度(如果能提高速度那就很好了,有什么办法吗) ⑴速度没以前快⑵当一列显示不完时候,显示的是....,当去拉动的时候数据量大了就会死掉,能不能一行固定,字数多了就显示到下一排,这样就可以不用拉动(主要针对表头)(3)过滤也是同样问题,数据大的时候,每过滤一次速度很慢(4)锁定列也是速度问题;


谢谢 性能是一个永恒的主题 我会继续为优化性能而努力的 但是能否达到您的预期我就不敢保证了. 因为因素很多. 顺便问一下 您那里每页多少记录?多少列?
另外 您说的内容多了自动换行 目前实现起来有一定的技术难度,暂时还无法支持.


0 请登录后投票
   发表时间:2008-09-26  
哇噻,不错啊!现在这一款的功能越来越强大了,基本上能满足我项目的需要,上次提出的点击不同列,都能弹出一个编辑框的问题也都解决了。感谢fins!
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics