generate datatable automaticlly using the ajaxresource

generate datatable automaticlly using the ajaxresource

ElementEElementE Posts: 2Questions: 0Answers: 0
edited March 2012 in General
i get two dimensional matrix (array of arrays) from the ajaxresource,the data just like this:"aaData":[ ["1","a1","a2","a3"],
["2","b1","b2","b3"],
["3","c1","c2","c3"]
]
,but in real they may have 100 columns and 100 rows.i have seen so many examples and all of them using the parameter "aoColumns" or "aoColumnDefs" to set the column number when initialize the datatable, but i can't input the null 100 times in "aoColumns",so how can i initialize the datatable automaticlly without using the patameter "aoColumns" or "aoColumnDefs".

Replies

  • pranaysonipranaysoni Posts: 23Questions: 2Answers: 0
    I also have this problem if yo have any idea in asp.net datatable to create "aoColumn" json string
    help me
  • ElementEElementE Posts: 2Questions: 0Answers: 0
    in the jsp the code just like this:


    and i get the data from ajasource without knowing the details of the data(array of arrays) like the column number,i just want to generate the datatable automaticlly with the data.In the usage of "column" i find this" Use 'null' where you wish to use only the default values and automatically detected options."but it also says " If specified, then the length of this array must be equal to the number of columns in the original HTML table" so i have a 100*100 array i have to input null in aocolumns 100 times, is there other solutions .
This discussion has been closed.