aaData not working in jquery each statement

aaData not working in jquery each statement

nitinjambhalenitinjambhale Posts: 2Questions: 0Answers: 0
edited June 2013 in DataTables 1.9
aaData not working in jquery each statement ..
My scenario:
i m calling service and my succedded function is :

function ServiceSucceeded(result) {
if (DataType == "json") {
//alert(result);
var obj = jQuery.parseJSON(result);

if (obj != null) {

$('#demo').html('');
$('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sScrollY": "400px",
"aaData": [
jQuery.each(obj, function (key, value) {

if (key < 1)
{
[ "sda", "asd","weq","fgtre" ]
// here i m generating html controls as well.

}
}) // end of for each
],

//], // end of aaData

"aoColumns": [

{ "sTitle": '1', "sClass": "center", "sWidth": "15px" },
{ "sTitle": '2', "sClass": "center", "sWidth": "20px" },
{ "sTitle": '3', "sClass": "left", "sWidth": "250px" },
{ "sTitle": '4', "sClass": "left", "sWidth": "250px" }

] // end of aaColumns

});


when i run this [object Object] is showing in all columns.
Please help.

Regards,
Nitin Jambhale.

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read#Item_7
  • nitinjambhalenitinjambhale Posts: 2Questions: 0Answers: 0
    edited June 2013
    Hello,
    Can u plz tell me how to create test cases, i m very new to this one.
    I m maintaining all js and css in local folder so unable to use in fiddler.
    Please advise.
  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    On http://live.datatables.net/ you can just add all the JavaScript you need in the 'JavaScript' container.

    CSS could be added to the HTML (inline), but I think it is not needed in your case.
This discussion has been closed.