The cfc is just as simple, receive all those required paramaters (lines 2-5).
Lines (7-10) defines a default sort order because the first time you run a grid, you haven't clicked the column header.
It is cool BUT The only problem I found with the result is that the grid eliminate all the leading zeros from one of my column. Also when I cfoutput them I can see all the leading zeroes.
Only when it show up within cfgrid those leading zeroes was stripped Is this a bug?
This is done using the On line 2, the cfgrid line, add a binding, and yes all those bind attributes are required, it's so that the cfc can return the right set of records for the page you are on.
cfgridpage = what page the grid is on cfgridpagesize = how many records are displayed per page cfgridsortcolumn = the selected column to sort cfgridsortdirection = the sort direction These get sent to the cfc so that it can pull apart the query and return the right information.
So in my attempt to learn the CFGrid I started with using For my project I would need to have paging. Thankfully there is another way to bind data to the Cf Grid that will use the built in paging.
I'm finding that its working ok on Windows 2k boxes, but does not work on Windows XP SP2 boxes. So I just started learning about Cold Fusion and one of the first thing I had to do was bind some data to a grid or table.So being an developer I looked for the Cold Fusion equivalent to an ASP Grid View.The query normally (prior to dropping it in the CFC anyway, I was using a query in the grid originally) works fine so it's something about the bind. PJ @ Saturday - AM 10 minutes start to finish with changes made for my Db. John W @ Monday - PM the sorting is fetching results out of the record set ... Great job sattibabu @ Tuesday - PM To clarify the file is missing the cfcomponent tags.
loshy @ Wednesday - AM I am just downloading your code samples and i try to run.
Line 18 takes the query and only returns the part of the query you need to display the page.