public/javascripts/inputex/js/widgets/DataTable.js
function(field) {
      
      var key, label, colmunDef;
      
      // Retro-compatibility with inputParms
      if (lang.isObject(field.inputParams)) {
         key = field.inputParams.name;
         label = field.inputParams.label;
      
      // New prefered way to set options of a field
      } else {
         key = field.name;
         label = field.label;
      }
      
      columnDef = {
         key: key,
         label: label,
         sortable: true, 
         resizeable: true
      };

      // Field formatter
      if(field.type == "date") {
      	columnDef.formatter = YAHOO.widget.DataTable.formatDate;
      }
		else if(field.type == "integer" || field.type == "number") {
			columnDef.formatter = YAHOO.widget.DataTable.formatNumber;
			/*columnDef.sortOptions = {
				defaultDir: "asc",
				sortFunction: // TODO: sort numbers !!!
			}*/
		}
      // TODO: other formatters
      return columnDef;
   }
function(field) {
      
      var key, label, colmunDef;
      
      // Retro-compatibility with inputParms
      if (lang.isObject(field.inputParams)) {
         key = field.inputParams.name;
         label = field.inputParams.label;
      
      // New prefered way to set options of a field
      } else {
         key = field.name;
         label = field.label;
      }
      
      columnDef = {
         key: key,
         label: label,
         sortable: true, 
         resizeable: true
      };

      // Field formatter
      if(field.type == "date") {
      	columnDef.formatter = YAHOO.widget.DataTable.formatDate;
      }
		else if(field.type == "integer" || field.type == "number") {
			columnDef.formatter = YAHOO.widget.DataTable.formatNumber;
			/*columnDef.sortOptions = {
				defaultDir: "asc",
				sortFunction: // TODO: sort numbers !!!
			}*/
		}
      // TODO: other formatters
      return columnDef;
   }
function ( field ) { var key , label , colmunDef ; // Retro-compatibility with inputParms if ( lang . isObject ( field . inputParams ) ) { key = field . inputParams . name ; label = field . inputParams . label ; // New prefered way to set options of a field } else { key = field . name ; label = field . label ; } columnDef = { key : key , label : label , sortable : true , resizeable : true } ; // Field formatter if ( field . type == "date" ) { columnDef . formatter = YAHOO . widget . DataTable . formatDate ; } else if ( field . type == "integer" || field . type == "number" ) { columnDef . formatter = YAHOO . widget . DataTable . formatNumber ; /*columnDef.sortOptions = {
				defaultDir: "asc",
				sortFunction: // TODO: sort numbers !!!
			}*/ } // TODO: other formatters return columnDef ; }
Convert a single inputEx field definition to a DataTable column definition
Convert a single inputEx field definition to a DataTable column definition