Saturday, March 20, 2010    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Mar 2007 >>
S M T W T F S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
             

Search

Categories
 • Acrobat (3) [RSS]
 • Adobe (90) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (66) [RSS]
 • AdobeMAX09 (39) [RSS]
 • AdobeMAX10 (1) [RSS]
 • AIR (219) [RSS]
 • Appearances (191) [RSS]
 • Books (72) [RSS]
 • CFEclipse (15) [RSS]
 • ColdFusion (1381) [RSS]
 • Data Services (34) [RSS]
 • Fish Tank (5) [RSS]
 • Flash (197) [RSS]
 • Flex (498) [RSS]
 • Home Automation (5) [RSS]
 • Jobs (116) [RSS]
 • JRun (14) [RSS]
 • Labs (43) [RSS]
 • LiveCycle (34) [RSS]
 • MAX (232) [RSS]
 • Mobile (120) [RSS]
 • Regular Expressions (17) [RSS]
 • RIA (21) [RSS]
 • SQL (40) [RSS]
 • Stuff (536) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (162) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • Mark Doherty
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Entry / Main
March 28, 2007

Scorpio's Ajax Data Grid

<cfgrid> has been around for a long time. It started life as a Java applet, then in CFMX7 we added a Flash grid and XML generation, and in Scorpio we plan on adding an Ajax powered DHTML grid.

You'll be able to pass a query to the grid as you did previously, like this:

<cfquery datasource="myDSN" name="myQuery">
SELECT * FROM myTable
</cfquery>

...

<cfgrid name="staticgrid" query="myQuery" format="html" />

But where things get really interesting are when data is retrieved asynchronously (in much the same way as in the auto-suggest example I mentioned earlier this week). Look at this example:

<cfgrid name="asynchgrid"
    format="html"
    pageSize="10"        
    bind="cfc:data.getData({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})" />

The bind attribute specifies the CFC and method to be invoked, and the current page, page size, and sort information get passed to the CFC method which then returns the appropriate query data. And yes, this does mean that paging is supported, the grid contains paging controls and when you move through pages (or resort columns) the CFC method is asynchronously invoked and the grid is updated accordingly.

And of course there is more, for example:

<cfgrid name="asynchgrid"
    format="html"
    pageSize="10"
    bind="cfc:data.getData({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
    stripeRows="true"
    stripeRowColor="##e0e0e0">

        <cfgridcolumn name="firstName" header="First Name">    
        <cfgridcolumn name="lastName" header="Last Name">    
        <cfgridcolumn name="phone" header="Phone">    
</cfgrid>

Of course, this is all subject to change. :-)

Related Blog Entries

TrackBacks
There are no trackbacks for this entry.

No trackback URL. Trackbacks are only allowed via interactive form.

Comments

  © Copyright 1997-2009 Ben Forta, All Rights Reserved