开发者

How to change data definitions in datatable of yui?

I am using YUI to develop web application. I can create and update from dynamic xml. There is no problems for update data but the problems is header is not change. How I can inject new header or column definition to the datatbles. Here are code I useung

//This p开发者_如何学运维art is not run.
ajaxtable.oDT.responseSchema = {
    resultNode: "element",
    fields: Fields
};
ajaxtable.oDT.aColumnDefs=ColumnDefs;

// This part is run properly.
ajaxtable.oDT.getDataSource().sendRequest("param="+link,
    {success: ajaxtable.oDT.onDataReturnInitializeTable},
ajaxtable.oDT);


I'm not 100% sure I understood your question, but it seems like what your looking for is the the formatter property in the column definition.

{key:"type", label: "", sortable:true, formatter: "formatIcon"}

Implement it like this:

YAHOO.widget.DataTable.Formatter.formatIcon = function(elLiner, oRecord, oColumn, oData) { };

Take a look here for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜