Resizable Gridview columns using javascript

你。 提交于 2020-01-11 02:48:10

问题


I want to Resize Gridview columns using javascript. Below is an example.


回答1:


I think this plugin does what you requested http://www.ita.es/jquery/jquery.grid.columnsizing.htm

Though I would suggest checking out this customizable jQuery based grid aswell http://www.trirand.com/blog/




回答2:


I would recommend using jQuery if you want to do this yourself. You can grab the click event of the header row (or wherever you want), and then you can use the x/y of the mouse to drag a line. Once the mouse is released, you can troll through the table and reset the width of the 's.

Otherwise, there are several JavaScript table controls on the internet that you could use.




回答3:


You can try open-source project ASP.NET CoolGridView control. It works well with IE 6/7/8, Firefox 3.0 / 3.5, Safari and Chrome. Supports resizable columns and fixed headers.

http://johnsobrepena.blogspot.com/2010/02/coolgridview-february-2010-release.html




回答4:


The example you are refering to is using ExtJS it looks like. There's also jqGrid (an extension to jQueryUI), and others. If you are looking for an ASP.Net Ajax grid control there are several options from many different component vendors (Component One, Infragistics, DevXPress etc).

I'm only presuming here that you want a server-oriented Grid component because of the term "GridView" in the question. I would suggest searching for: "ASP.Net Ajax" grid control. This will give you results that may best suit your needs.



来源:https://stackoverflow.com/questions/2115783/resizable-gridview-columns-using-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!