Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Showing information with data grid enhancements

From: ColdFusion 9 New Features

Video: Showing information with data grid enhancements

Let me just start by saying that I love cfgrids. The cfgrid is a great way to show large sets of data very quickly. In ColdFusion 8 however, there were some limitations to how you could display and manipulate grids in HTML. ColdFusion 9 takes one more step towards exposing the full feature set of the Ext JSs grids through tags. In this video, I am going to show you the new features of the cfgrid and cfgrid column tags in ColdFusion 9. So in Chapter8, let's open up cfgrid.cfm. Now, in this file I have two grids setup. The first one shows us some art pieces.

Showing information with data grid enhancements

Let me just start by saying that I love cfgrids. The cfgrid is a great way to show large sets of data very quickly. In ColdFusion 8 however, there were some limitations to how you could display and manipulate grids in HTML. ColdFusion 9 takes one more step towards exposing the full feature set of the Ext JSs grids through tags. In this video, I am going to show you the new features of the cfgrid and cfgrid column tags in ColdFusion 9. So in Chapter8, let's open up cfgrid.cfm. Now, in this file I have two grids setup. The first one shows us some art pieces.

The second one which is currently commented out, and we will get to it in a little bit shows us some order information from our art galleries. Let's go back up here to the top and take a look at some of the new attributes on the cfgrid tag. The first one that's been added is the title attribute on the cfgrid. Let's take a look at this file in the browser and see exactly what that does for us. Let's go to localhost8500/Chapter8/cfgrid.cfm. The title attribute allows us to put a nicely formatted header at the top of our grids.

Now, while that looks good, it also serves another purpose with one of the other new attributes on the cfgrid. Let's go back to see CF Builder and we'll add collapsible = "true" to our grid. If I return to the browser and reload, I now have this little triangular icon here that allows me to expand and collapse my grid. If you are doing a page with a lot of data on it, in two or three different grids in order to see exactly what's going on, this comes in really handy to be able to get a nice overview of information and then expand the grid to get more details.

The last new attribute on the cfgrid tag is the groupfield attribute. Let's go back to CF Builder and add that. So we want to group our grid by the IsSold column. If we go back to Safari and preview, it's now grouping each of my sets of data by the unique values in the IsSold column. So in this case I can see I have 4 unsold items and 11 sold items. Now, I can also go up here and click next to Price and group by this field instead.

So if I click Group here, you will see that I have everything is grouped into single item entries because there's no two items with the same price. Now there also has been some changes to the cfgrid column tag. Adobe has added new type that gives us a nicer display for specialized data such as Booleans or dates. So if we go back to CF Builder, let's add a new type attribute to our Sold column and we'll say type ="boolean". Now because I am in an edit mode on this particular grid, when I preview the grid now I'll see checkboxes for the IsSold column.

I'll reload our page and I get a nice series of checkboxes, which I can then check and uncheck. And when I submit this form, I can send that data back to the server. In ColdFusion 8, a user would have to enter 1 or 0, or use the dropdown list to select yes or no, and then send that data back to the server. So we have one more change that has to do with dates and we'll show that in our second grid. So let's go ahead and comment this one out. And I'll uncomment our grid here at the bottom.

Now on my bottom grid I've added a few additional features. I have insert, insertbutton, delete, and deletebutton. In ColdFusion 8, these were only available inside Flash forms. In ColdFusion 9, I can now insert new records and delete records in HTML grids and submit that data back to the server. I've also added a type of date to my OrderDate column, which will give me a nice date picker whenever I go to edit that record. So let's preview that in the browser. I'll save my file, switch over to Safari, and reload.

And we can see it's grouped by First name, so I have both my Bobs together, my dates are nicely formatted. And if I click inside here, I can click the date field. It highlights a correct date, I can change it and I have a nice date selecter here. So I don't have to depend on my user to figure out how to properly format their dates. And remember the February only has 21 days. Now, if I scroll down to the bottom I also have Insert New Row and Delete Selected Row. So for example, if I highlight here, I can delete this row and insert a new one at the bottom.

Then I can go in and add my data in here. Because I have specified the ID to be numeric, I am pressing ABC right now, but I can't enter any invalid data into that column. We'll click on the date and once again I get my nice date picker. So in ColdFusion 9, HTML grids have now caught up with their Flash equivalents, allowing you to sort, group, and edit data directly from inside the grid.

Show transcript

This video is part of

Image for ColdFusion 9 New Features
ColdFusion 9 New Features

36 video lessons · 2906 viewers

Daniel Short
Author

 
Expand all | Collapse all
  1. 4m 30s
    1. Welcome
      53s
    2. Using the exercise files
      3m 37s
  2. 7m 48s
    1. Adding managing and comparing servers
      5m 26s
    2. Monitoring server health
      2m 22s
  3. 22m 10s
    1. Setting the default data source and SMTP
      5m 6s
    2. Getting programmatic debugging and exception handling
      5m 54s
    3. Reviewing the new onCFCRequest method
      5m 29s
    4. Using ApplicationStop()
      2m 24s
    5. Working with Server.cfc and onServerStart
      3m 17s
  4. 17m 45s
    1. Using ternary and chained operations
      5m 46s
    2. Using New and Import
      4m 2s
    3. Reviewing CFScript enhancements
      7m 57s
  5. 20m 23s
    1. Building with implicit getters and setters
      4m 26s
    2. Working with LOCAL scope in functions
      4m 35s
    3. Serializing objects
      6m 6s
    4. Writing components in CFScript
      5m 16s
  6. 19m 27s
    1. Getting started with ORM
      5m 51s
    2. Logging ORM activity
      2m 13s
    3. Saving objects to the database
      6m 10s
    4. Defining table relationships
      5m 13s
  7. 16m 59s
    1. Caching page fragments
      5m 29s
    2. Managing the cache
      4m 48s
    3. Working with in-memory files using VFS (RAM disks)
      6m 42s
  8. 12m 39s
    1. Working with Excel spreadsheets
      4m 56s
    2. Working with Word documents
      4m 4s
    3. Working with PowerPoint presentations
      3m 39s
  9. 28m 58s
    1. Loading Google maps with markers onto a page
      4m 53s
    2. Adding a Flash movie with the built-in FLV player
      2m 14s
    3. Using multi-file upload control
      6m 7s
    4. Building a progress indicator
      3m 37s
    5. Working with accordion layouts
      3m 18s
    6. Showing information with data grid enhancements
      5m 1s
    7. Informing users with Confirm Alert and Prompt dialog boxes
      3m 48s
  10. 9m 8s
    1. Accessing IMAP accounts
      6m 31s
    2. Working with the new array functions
      2m 37s
  11. 15s
    1. Goodbye
      15s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ColdFusion 9 New Features.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.