Grouping columns with array as columns definition

Grouping columns with array as columns definition

diegofiodiegofio Posts: 3Questions: 0Answers: 0
edited December 2011 in General
Is it possible?
My datatables use an array as definition for columns, for example:

[code] "aoColumns": [
{ "sTitle": "Engine" },
{ "sTitle": "Browser" },
{ "sTitle": "Platform" },
{ "sTitle": "Version", "sClass": "center" },
{
"sTitle": "Grade",
"sClass": "center",
"fnRender": function(obj) {
var sReturn = obj.aData[ obj.iDataColumn ];
if ( sReturn == "A" ) {
sReturn = "A";
}
return sReturn;
}
}[/code]


Can i group columns with usage of aoColumns or the only possibility is to to use html header?

Thanks.
Diego

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    You mean using colspan? There is no functionality for this to be defined in aoColumns at the moment I'm afraid. You would need to use standard jQuery/DOM methods to create the header with rowspan/colspan in it.

    Allan
  • diegofiodiegofio Posts: 3Questions: 0Answers: 0
    ok thanks allan
This discussion has been closed.