Cross-browser DHTML/JS Excel-like "GRID"

Discussion in 'Javascript' started by Questman, Jan 19, 2006.

  1. Questman

    Questman Guest

    Good afternoon,

    Does anyone have any code that implements, or approaches implementing, a
    cross-browser DHTML/JS solution to provide an Excel-like Grid on a web
    page - I'm trying to convert an old Java client/server data maintenance
    program to the web - the main display is in a grid format, which allows
    the user to select multiple rows and edit them in a new grid, which
    processes each grid line individually and validates and saves the data.
    In addition users enter new data in another new grid that allows them
    to manually type data in and val/save, or paste from, say, excel.

    I thought I recalled seeing someone implement this sort of thing, and
    I've actually gotten some of it to work IE-centric at one point, but
    never finished it, and I'd love a more cross-browser (IE and FF at
    least) approach.

    Thanks!

    Rick
    Questman, Jan 19, 2006
    #1
    1. Advertising

  2. Questman

    Guest

    You casn use like absolutely positioned textboxes and the eval()
    function no?
    , Jan 20, 2006
    #2
    1. Advertising

  3. Questman

    RobG Guest

    Questman wrote:
    >
    > Good afternoon,
    >
    > Does anyone have any code that implements, or approaches implementing, a
    > cross-browser DHTML/JS solution to provide an Excel-like Grid on a web
    > page


    A 'grid' can be implemented as a table - get your data and write it into
    the cells, one row per record. There are sortable tables that let you
    sort by particular columns and to re-size them - but that may not be
    what you want (it may add unnecessarily to the script overhead).

    There is one here:

    <URL:http://www.kryogenix.org/code/browser/sorttable/>

    Its speed is OK for a few rows (or maybe 30 or 40 on fast machines), if
    more are required the sort can be significantly optimised.


    > I'm trying to convert an old Java client/server data maintenance
    > program to the web


    There are two basic ways to port the client component an application:

    1. Make a duplicate of the interface and have it behave exactly as it
    did on the original (well, as near as can be done anyway).

    2. Look at *what* the application does and replicate that, taking
    advantage of the new platform's strengths and avoiding or mitigating the
    weaknesses.

    Usually 1. is a waste of time, it is really only suitable where die-hard
    users absolutely refuse to change they work or the new environment is
    pretty much exactly the same as the old (and the application works well
    enough that it doesn't need optimising).

    Point 2 tries to actually deliver something better and more efficient -
    if it doesn't, what's the point of the port? Trying to slavishly copy
    functionality to another, very different platform will almost certainly
    result in so many trade-offs that rather than a clean port you get some
    kind of bastard child that kinda works but not really.


    > the main display is in a grid format, which allows
    > the user to select multiple rows and edit them in a new grid, which
    > processes each grid line individually and validates and saves the data.


    You can do that by putting checkboxes on the rows to be edited then have
    an 'edit selected' button, or you could make it so that clicking on a
    row makes it editable. Or you could just load it into a form in a table
    and let users edit as they please.


    > In addition users enter new data in another new grid that allows them
    > to manually type data in and val/save, or paste from, say, excel.


    Use a form for manual entry, pasting from other applications is
    problematic - text pasted from Excel seems to be tab delimited with
    returns between records, so you may be able to paste into a text area
    and parse it to put values into a form.


    > I thought I recalled seeing someone implement this sort of thing, and
    > I've actually gotten some of it to work IE-centric at one point, but
    > never finished it, and I'd love a more cross-browser (IE and FF at
    > least) approach.


    That shouldn't be a problem if you develop in something other than IE
    (say Mozilla or Firefox), then test in IE you will likely get the job
    done faster and have fewer (maybe zero) cross-browser issues.


    --
    Rob
    RobG, Jan 20, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. imghani

    A Truly Excel-like Grid Control

    imghani, Aug 18, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    11,125
    Mark Rae
    Aug 18, 2006
  2. Web Master

    Cross browser DHTML

    Web Master, Jul 29, 2003, in forum: Javascript
    Replies:
    1
    Views:
    67
    Web Master
    Jul 29, 2003
  3. Matt Kruse
    Replies:
    0
    Views:
    233
    Matt Kruse
    Jan 26, 2004
  4. Steve
    Replies:
    1
    Views:
    273
    Richard Cornford
    Apr 9, 2005
  5. cjl
    Replies:
    3
    Views:
    123
Loading...

Share This Page