How to create Editable Grid using DHTML

This is a discussion on "How to create Editable Grid using DHTML" within the Web Page Design section. This forum, and the thread "How to create Editable Grid using DHTML are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 16th, 2003, 11:30
New Member
Join Date: Oct 2003
Location: India
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How to create Editable Grid using DHTML

Hi,
I want to create Editable Grid in DHTML. And Grid should have option of freezing columns & rows.

Anybody can give me solution to create such a grid.

Thanks

  #2 (permalink)  
Old Oct 16th, 2003, 12:22
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
http://dhtmlgrid.sourceforge.net/

  #3 (permalink)  
Old Oct 16th, 2003, 13:08
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
it's rough, but is your basic logic. Is this the sort of thing you are looking for?

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
	<style type="text/css">
	input{
		border: 0px 0px 0px 0px;
		font-family: verdana;
		fot-size: 10px;
		}
		
	td{
		border: 1px solid #aaaaaa;
		}
	</style>
	
	<script language="JavaScript" type="text/javascript">
	function ControlGrid(colrow)
		{
		for(a=0; a<document.frmGrid.elements.length; a+=1)
			{
			if(document.frmGrid[a].name.substring(0,2) == colrow)
				{
				if(document.frmGrid[a].disabled==false)
					{
					document.frmGrid[a].disabled=true
					}
				else
					{
					document.frmGrid[a].disabled=false
					}					
				}
				
			if(document.frmGrid[a].name.substring(2,4) == colrow)
				{
				if(document.frmGrid[a].disabled==false)
					{
					document.frmGrid[a].disabled=true
					}
				else
					{
					document.frmGrid[a].disabled=false
					}					
				}
				
			}
		}
	</script>
</head>

<body>

<form name="frmGrid">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td></td>
		<td><input type="button" value="Enable/Disable" onClick="ControlGrid('c1')"></td>
		<td><input type="button" value="Enable/Disable" onClick="ControlGrid('c2')"></td>
		<td><input type="button" value="Enable/Disable" onClick="ControlGrid('c3')"></td>
	</tr>
	
	<tr>
		<td><input type="button" value="Enable/Disable" onClick="ControlGrid('r1')"></td>
		<td><input type="text" name="c1r1"></td>
		<td><input type="text" name="c2r1"></td>
		<td><input type="text" name="c3r1"></td>
	</tr>
	
	<tr>
		<td></td>
		<td><input type="text" name="c1r2"></td>
		<td><input type="text" name="c2r2"></td>
		<td><input type="text" name="c3r2"></td>
	</tr>
</table>
</form>


</body>
</html>
HTH
u2o
  #4 (permalink)  
Old Oct 20th, 2003, 13:17
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
nice!

What are these grids used for anyway? Any how could i use one in conjuction with asp? Like how do you pass the edited values to another page where they are saved into a database using asp?

Thanks
Closed Thread

Tags
create, editable, grid, using, dhtml

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editable websites kmcreative Starting Out 5 Sep 28th, 2007 15:19
Data grid controls Alfonso Calderon ASP.NET Forum 5 Aug 5th, 2006 04:31
Help designing a crossword grid... andrewsco Web Page Design 4 Jul 3rd, 2006 08:05
Break the Grid kevrapley Introduce Yourself 3 Jun 7th, 2004 09:01


All times are GMT. The time now is 21:25.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43