A user asked me to provide an example of related ColdFusion powered Ajax data grids, where a selection made in one grid would update the contents in a second grid. So, here is a simple example which uses the sample databases that are included with ColdFusion 8. One
First the CFC:
SELECT artistid, lastname, firstname, email
FROM artists
ORDER BY #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdir#
SELECT artid, artname, description
FROM art
WHERE artistid = #ARGUMENTS.artistid#
ORDER BY #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdir#
The client side code is pretty simple:
Artists
Art
The code uses
Leave a Reply