donno20 has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,
Is it possible to make a grid control in web to display information. The grid control is consists of column and row, each column is analogy to field in term of database. And sorting a particular column by clicking on the column header.
Any pointer are welcome. Thanks ^_^

Replies are listed 'Best First'.
Re: Grid control in web
by hossman (Prior) on May 08, 2003 at 03:22 UTC
    Typicaly, unless you have serious concerns about browser compatibility, this is the kind of thing that can best be done in javascript, so the user doesn't have to wait for the page to reload just to view the data in a different sort order.
      I would argue that this depends on the nature of the application.

      Due to the nature of the data I am working with I usually end up with a form consisting of an updatable grid of <input type=text name=new-XXX-YYY> and <input type=hidden name=old-XXX-YYY> I can then update only the changed values relative to the old form that haven't been updated in the mean time. With warnings if the underlying data has changed.

      Sorts with large data sets are best handled server side so that you can page the data. 5000 rows would not be fun in a single page.

      Again the best solution for you will depend on the size, complexity and speed of change of your data.

      Hope it helps
      UnderMine

      Thanks for your input. The link is great !!
      ^_^
Re: Grid control in web
by Abstraction (Friar) on May 08, 2003 at 02:58 UTC
    Is it possible to make a grid control in web to display information.

    Certainly.


    Any pointers are welcome.

    A few places to start are CGI, DBI, Class:DBI and HTML::Template.


Re: Grid control in web
by UnderMine (Friar) on May 08, 2003 at 10:08 UTC

    You can also do this with divs/layers in the HTML and a simple bit of Javascript that shows or hides layers as required.

    This creates a large HTML page with multiple copies of the table but is good if you only need to sort on a few or complex critera that are not displayed. Top 10 charts etc.

    Hope this helps
    UnderMine