8 Replies Latest reply on Mar 14, 2008 8:00 AM by Newsgroup_User

    How to create table of results

    davdavdavdav
      Hi,

      I am using a database in director and after a search I will end up with multiple record results. How do I present these to the user in a table which is then selectable per row?? I thought using a Flash DataGrid would be a good idea but I don't know how or if there is an easier way.

      Eg, searching for "john smith" will result in 30 records, and then the user will see them in a table with more details, eg address. The user can then double click on one (or more) of them, and a details screen will pop up.

      Thanks.
        • 1. Re: How to create table of results
          Level 7
          I have used the cXtraStringGrid for this sort of solution, but it's
          Windows-only and not particularly well supported.

          You can build a table using html in a #text member. There are some
          open-source implementations of this out there.
          • 2. Re: How to create table of results
            davdavdavdav Level 1
            I need cross platform support so cXtraStringGrid is not an option, and the html solution kind of scares me.

            You would think someone has an example of using a Flash DataGrid within a Director project?!

            Anyone??
            • 3. Re: How to create table of results
              liveoak Level 1
              Electronic Ink had a cross platform Xtra to do tables - I know they are still active in developing PrintOMatic, but am not sure if they are still active on this one. Drop them an email.

              http://www.printomatic.com/products.cfm?page=3
              • 4. Re: How to create table of results
                Level 7
                davdavdavdav wrote:
                > I need cross platform support so cXtraStringGrid is not an option, and the html
                > solution kind of scares me.
                >
                > You would think someone has an example of using a Flash DataGrid within a
                > Director project?!
                >
                > Anyone??
                >
                It might take a bit of work, but I wouldn't think it would be all that
                difficult to build the functionality using native lingo.
                • 5. Re: How to create table of results
                  liveoak Level 1
                  quote:

                  Originally posted by: Newsgroup User
                  It might take a bit of work, but I wouldn't think it would be all that
                  difficult to build the functionality using native lingo.


                  I did this once for a project - tracking hundreds of variables that appeared onscreen in a grid. Was pretty ugly.

                  If I did it again, one thing I might explore is wrapping the data inside a pre-made pdf document - these are editable on the fly, as long as you know the variable size to begin with. So a grid of number would work, whereas a text entry box that might vary from one word to one page wouldn't.
                  • 6. Re: How to create table of results
                    Level 7
                    If you are still looking for possible solutions, I decided to create a
                    basic example of my previous suggestion. I am not saying this is the
                    easiest way to accomplish what you want, but it is cross-platform since
                    it uses only native Lingo. It would also be free, well it would cost you
                    time to complete, but no money ;-). Plus you would get to learn a little
                    about imaging Lingo, which is cool stuff.

                    There would certainly be more effort required to flesh it out, but feel
                    free to download the zip file and have a look. Good luck.


                    http://v-fort.org/director/tableExample.zip
                    • 7. Re: How to create table of results
                      davdavdavdav Level 1
                      Thanks Dave C... very impressive. It may be all I need, ie a window for 20 rows and data behind if of 50 records. Then your solution looks great - it's fast, easy to use, and very responsive.

                      I looked at your code and got lost very quickly. I don't even know how to find the script for the two buttons you put. How do I view the code.

                      May I be rude enough to ask for some comments in the code to further explain what's going to me?! Or perhaps you could direct me to some particular Director help topics?

                      Thanks again.
                      • 8. Re: How to create table of results
                        Level 7
                        Well like I mentioned, it's just a basic 'proof of concept' of how you
                        could show your data. I'm not sure how your data will be structured or
                        how you will be extracting it from the database, but I am certain the
                        code could be tweaked to work. Also, there is much you could do to make
                        it prettier, i.e. add color, shading, etc.

                        There are potentially some 'errors' that could occur with the code as it
                        is. It would need to be fleshed out more. For example, if a cell has a
                        long data string. Writing the code to handle all of these potential
                        problems is going to take time. It may or may not be worth the effort,
                        especially if there is an existing solution like the Flash Datagrid
                        (which I know nothing about). I guess that's a personal decision.

                        The button scripts are cast member scripts. You can see them by
                        right-clicking (in Windows anyway) on the button cast members in the
                        cast and selecting "Cast Member Script".

                        If you are really interested in pursuing this route, you can start by
                        reading up on imaging lingo in the help topics. Specifically the image()
                        function, the image property and the copyPixels() function. That's all I
                        am really using here. The rest is standard stuff, like lists, nested
                        repeat loops I don't mind helping you as time permits, but I can't make
                        any promises.




                        davdavdavdav wrote:
                        > Thanks Dave C... very impressive. It may be all I need, ie a window for 20
                        > rows and data behind if of 50 records. Then your solution looks great - it's
                        > fast, easy to use, and very responsive.
                        >
                        > I looked at your code and got lost very quickly. I don't even know how to
                        > find the script for the two buttons you put. How do I view the code.
                        >
                        > May I be rude enough to ask for some comments in the code to further explain
                        > what's going to me?! Or perhaps you could direct me to some particular
                        > Director help topics?
                        >
                        > Thanks again.
                        >