ASP
  Home arrow ASP arrow Page 5 - Real Time Data Grid Part 2/2
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

Real Time Data Grid Part 2/2
By: Annette Tennison
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 11
    2002-02-08

    Table of Contents:
  • Real Time Data Grid Part 2/2
  • The JavaScript code
  • The JavaScript code (contd.)
  • The doDel JavaScript function
  • Using our DynamicGrid class
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Real Time Data Grid Part 2/2 - Using our DynamicGrid class


    (Page 5 of 6 )

    Because everything we need to use our DynamicGrid class is encapsulated into one ASP file, all we have to do is make a slight modification to the file in order for it to work. Make sure the strConnectionString variable is set to connect to your SQL Server 2000 database correctly. If you want to test it with your own database, then change the value of the "Initial Catalog" part of the connection string to match the name of your database. Also make sure that the user ID and password fields are correct for your server.

    Create a new ASP page called testgrid.asp and save it in the same directory as dynamic.datagrid.asp in a directory that IIS can access. Enter the following code into testgrid.asp:

    <!-- #INCLUDE file="dynamic.datagrid.asp" -->

    <%

    Dim dg1

    Set dg1 = new DynamicGrid



    dg1.TableName = "authors"

    dg1.InitializeGrid

    dg1.DisplayGrid "100%", 1, "#E7E3E7", "#BDDBFF", false, false

    %>


    That's all the code we need to use our DynamicGrid class in any ASP page. As you can see, I've made the CanEdit and CanDelete arguments false, so when the page is displayed we don't have the option to update or delete records:

    Showing our grid without the ability to update or delete records

    More ASP Articles
    More By Annette Tennison


     

    ASP ARTICLES

    - Central Scoreboard with Flash and ASP
    - Calorie Counter Using WAP and ASP
    - Creating PGP-Encrypted E-Mails Using ASP
    - Be My Guest in ASP
    - Session Replacement in ASP
    - Securing ASP Data Access Credentials Using t...
    - The Not So Ordinary Address Book
    - Adding and Displaying Data Easily via ASP an...
    - Sending Email From a Form in ASP
    - Adding Member Services in ASP
    - Removing Unconfirmed Members
    - Trapping HTTP 500.100 - Internal Server Error
    - So Many Rows, So Little Time! - Case Study
    - XDO: An XML Engine Class for Classic ASP
    - Credit Card Fraud Prevention Using ASP and C...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT