Skip to main content

Yahoo Datatable Datasource

1 reply [Last post]
Joined: 2008-03-30


I used Yahoo data table without jMaki I used the following definition, I would like to setup my datasource but don't know how to accomplish the same thing using jMaki Yahoo widget, can some one help.


var myDataSource = new YAHOO.util.DataSource("Grid?");
myDataSource.responseType = YAHOO.util.DataSource.TYPE_TEXT;
myDataSource.responseSchema = {
recordDelim: "\n", // Record delimiter
fieldDelim: ",", // Field delimiter
fields: [{key:"Code", parser:YAHOO.util.DataSource.parseNumber},
] // Field names

var myColumnDefs = [
{key:"Code", sortable:true, resizeable:true},
{key:"Name", sortable:true, resizeable:true}

var myDataTable = new YAHOO.widget.DataTable("myMarkedUpContainer", myColumnDefs, myDataSource, {scrollable:true, height:"10em", caption:"DataTable Caption", selectionMode:"single"});

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-07-31


May I suggest using the jMaki table / grid data model?

We have described with examples at:

You can also load things from a service using the same data model if you use the the service argument instead of the value.

Let us know if this doesn't work for you.