One of the more powerful features of the DataTable is the ability to have editable data and cells. There are a variety of built in cell editors, and this recipe will show you how to use each of them.
We will use the following DataSource and Column definition to render the DataTables:
var dsData = [ ['Findley, Robbie','F',69,165,new Date(1985,7,4), 'Phoenix, Ariz.','Real Salt Lake','no','opt2'], ['Onyewu, Oguchi','D',76,210,new Date(1982,4,13), 'Olney, Md.','AC Milan (Italy)','no','opt2'], ['Bocanegra, Carlos','D',72,170,new Date(1979,4,25), 'Alta Loma, Calif.','Rennes (France)','no','opt3'], /* more in coding sample */ ]; var dsConfig = { responseType:Util.DataSource.TYPE_JSARRAY, responseSchema:{fields:[ "name","position","height",'weight','birthday', 'hometown','club','injured','testCheckbox' ]} }; var myColumnDefs = [/* defined below */]; var myDataSource = new YAHOO.util.LocalDataSource(dsData, dsConfig); var myDataTable = new YAHOO.widget.DataTable(...