Important alert: (current site time 7/15/2013 11:45:20 PM EDT)
 

winzip icon

DataGrid Class

Email
Submitted on: 10/9/2002 12:21:05 PM
By: Nick DelMedico  
Level: Intermediate
User Rating: By 30 Users
Compatibility: ASP (Active Server Pages), HTML
Views: 41176
 
     After playing with ASP .NET's Data Grid, I figured I'd create something similar for use with ASP. I've begun by creating the properties and methods to reproduce the most commonly used and useful features of .NET's data grid. Easy to run examples included. Updated 10/28! 2nd version which allows column headers to be rendered as sort by links. Updated 12/27! Now can customize error message and display. Updated 2/21! Class optimized.
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
' for :DataGrid Class
'**************************************
See ReadMe.txt
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
10/10/2002 1:03:47 AMMark Focas

This is extremely nice code. Well done.
(If this comment was disrespectful, please report it.)

 
10/10/2002 5:20:55 AM

Superb! 5 globes from me. Adding field update functionality would be even better.
(If this comment was disrespectful, please report it.)

 
10/10/2002 7:43:21 AM

Well documented, pretty impressive. But will you have a new version to update/add a record just like the ASP.Net datagrid?
(If this comment was disrespectful, please report it.)

 
10/10/2002 11:28:59 AMmike

Very good work. "Excellent" vote from me.
Needs a property or method for including a link allowing selection of individual records from the grid for further processing.
(If this comment was disrespectful, please report it.)

 
10/11/2002 1:30:58 AMNick DelMedico

Now has methods to render values as links and properties to style them.
(If this comment was disrespectful, please report it.)

 
10/11/2002 5:35:56 AMAntonio Rodrigues

eXcelent code!!!
You've scored another 5 Globe, dude :)

Have more components?

(If this comment was disrespectful, please report it.)

 
10/18/2002 6:15:46 PM

Great class It would be nice to have a HeaderLinkClassName property To make links out of the column headers
(If this comment was disrespectful, please report it.)

 
10/18/2002 6:18:05 PM

Nm looks like it is already there in the methods.
(If this comment was disrespectful, please report it.)

 
10/19/2002 6:52:45 AMRandy McCleary

Hey, good job on the this script. It works perfect and will come in handy for many different things. This code gets a 5 from me. Great work, and keep up the good job.
(If this comment was disrespectful, please report it.)

 
10/24/2002 7:32:10 AM

Good work!
(If this comment was disrespectful, please report it.)

 
10/26/2002 1:26:25 AMJohn Manavalan

thanks 5* from Me
(If this comment was disrespectful, please report it.)

 
11/19/2002 10:23:56 AMEd Ruth

Excellent Code. 5 stars from me. Really useful!
(If this comment was disrespectful, please report it.)

 
11/20/2002 5:51:11 AM

Hey, what's this? R U kidding!! This is a super excelent plus Class!! You get 6 stars out of 5!! YEeees.
(If this comment was disrespectful, please report it.)

 
2/14/2003 7:04:07 PMBrio Networks

Excellent! Thanks for sharing.
(If this comment was disrespectful, please report it.)

 
3/12/2003 11:47:38 PM

Great grid... something that can be used without tweaking
(If this comment was disrespectful, please report it.)

 
3/14/2003 2:42:28 PMChris

Awesome Grid Class. I love ASP Classes that just plug right in. Has anyone enhanced this any (sorting, edting, adding)?
(If this comment was disrespectful, please report it.)

 
7/3/2003 10:58:15 AM

Very useful.
Thanks for sharing it!
(If this comment was disrespectful, please report it.)

 
9/29/2003 10:08:48 PM

ES UNA VERGA.... ANDA COMO QUIERE EL TEMA DEL AUTOGENERATECOLS
(If this comment was disrespectful, please report it.)

 
10/22/2003 2:45:01 AM

Excellent, but is there anyway to add new functionality like add a new row,delete row
(If this comment was disrespectful, please report it.)

 
1/23/2004 8:41:41 PMManoj

Very Nice Class. It would be nice if you can add hyperlink which can take some other parameter too. Also, Seems like Column name are case sensitive. It would be nice to make case insensitive

(If this comment was disrespectful, please report it.)

 
4/15/2004 5:17:57 PM

This is an excellent class. I agree that adding select, insert, delete and update functionality would be a great addition, but it works very well as is.
(If this comment was disrespectful, please report it.)

 
5/7/2004 6:10:53 AM

I agree with everyone else, this is indeed a very useful class. IMO Adding tooltips/titles to the links will make them more intuitive. I've edited my instance of the class to include a simple title i.e. "Edit" or "Search the Web"
(If this comment was disrespectful, please report it.)

 
5/8/2004 3:56:55 AM

OCX Control is very usefull
Sunilkumar Shinde
SunC India
www.suncindia.com
(If this comment was disrespectful, please report it.)

 
4/27/2005 5:51:39 AMBrian Battles WS1O

This is very nice, I give it "4"...I would have given it "5" if it included add/edit/deleting records! :-)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.