How to load a combobox in a particular column with different values for different rows
How to load a combobox in a particular column with different values for different rows
psathiya1987
Posts: 2Questions: 0Answers: 0
Hi, Below I have provided the table data that I want to render using datatables.
[code]
var location2=[
[ "Trident", "Internet Explorer 4.0", [45,67,76], 4, "X" ],
[ "Trident", "Internet Explorer 5.0", [57,89,90], 5, "C" ],
[ "Webkit", "Safari 3.0", [10,20,30], 522.1, "A" ]
];
[/code]
I have rendered the table as below
[code]
$('#example').dataTable( {
"aaData": location2,
"aoColumns":[
{ "sTitle": "Engine" },
{ "sTitle": "Browser" },
{
"sTitle": "Platform",
"sClass": "center",
"fnRender": function(obj) {
return '' + '2010' + '2011' + '2012' + ' ';
}
},
{ "sTitle": "Version", "sClass": "center" },
{ "sTitle": "Grade" }
]
}
);
[/code]
I want to add a combo box in the 3rd column "Platform" for all rows with the value for the combobox in each row to be dependent on the input. like [45,67,76] should be available in the combobox in row1 and [57,89,90] should be available in the combobox in row2 and so on.
Hope I have explained myself clearly my problem.
Please advice
[code]
var location2=[
[ "Trident", "Internet Explorer 4.0", [45,67,76], 4, "X" ],
[ "Trident", "Internet Explorer 5.0", [57,89,90], 5, "C" ],
[ "Webkit", "Safari 3.0", [10,20,30], 522.1, "A" ]
];
[/code]
I have rendered the table as below
[code]
$('#example').dataTable( {
"aaData": location2,
"aoColumns":[
{ "sTitle": "Engine" },
{ "sTitle": "Browser" },
{
"sTitle": "Platform",
"sClass": "center",
"fnRender": function(obj) {
return '' + '2010' + '2011' + '2012' + ' ';
}
},
{ "sTitle": "Version", "sClass": "center" },
{ "sTitle": "Grade" }
]
}
);
[/code]
I want to add a combo box in the 3rd column "Platform" for all rows with the value for the combobox in each row to be dependent on the input. like [45,67,76] should be available in the combobox in row1 and [57,89,90] should be available in the combobox in row2 and so on.
Hope I have explained myself clearly my problem.
Please advice
This discussion has been closed.
Replies