Using ColdFusion CFCs to return data to DataTables 1.8.2
Just a quick post, more as a reminder for myself really, about a quick an easy way to return a query via ajax and easily load into a DataTable. Simple CFC function: <cffunction name="GetUsers" access="remote" output="false" returntype="any" returnformat="json"> <cfquery name="local.qryUsers" datasource="dsn"> SELECT id, name, surname, email FROM tblUsers </cfquery> <cfscript> local.strData = StructNew(); local.strData['aaData'] =...
read moreUpdating DataTables display orders by drag and drop
Using the DataTables plugin for jQuery? In my opinion its the easiest to use datatable plugin with great built in functionality, however, i came across a situation that needed to have display orders for data in the table (think CMS data tables and ordering of records for front end use). DataTables doesnt have that functionality built in. jQuery UI to the rescue! My basic datatable markup with data built via a cfoutput query: <table id="myQueryList" class="datatable-display" border="0" cellspacing="0"...
read more


