confused populating the table
confused populating the table
Hello
I am new and confused about populating the data table.
I have an array as "obj" named.
I can use it as ( it seems ok)
data_table.fnAddData ( [obj[0].il,obj[0].ilce,obj[0].koy,obj[0].nakil] );
But in construction as ( it fails )
"aaData": [
[obj[0].il,obj[0].ilce,obj[0].koy,obj[0].nakil]
],
What am I doing wrong ?
you see I used only obj[0] values for testing purposes.
how can I populate the table with whole array ?
kind regards
Ahmet Temiz
I am new and confused about populating the data table.
I have an array as "obj" named.
I can use it as ( it seems ok)
data_table.fnAddData ( [obj[0].il,obj[0].ilce,obj[0].koy,obj[0].nakil] );
But in construction as ( it fails )
"aaData": [
[obj[0].il,obj[0].ilce,obj[0].koy,obj[0].nakil]
],
What am I doing wrong ?
you see I used only obj[0] values for testing purposes.
how can I populate the table with whole array ?
kind regards
Ahmet Temiz
This discussion has been closed.
Replies
obj was global variable anyway.
Is this syntax correct : "aaData": [
[obj[0].il,obj[0].ilce,obj[0].koy,obj[0].nakil]
],
Besides, when I put < data_table.fnAddData ( [obj[0].il,obj[0].ilce,obj[0].koy,obj[0].nakil] ); >
in a for loop it is very slow ( totally 1600 records)
regards
Allan
[code]
"aaData": obj
"aoColumns": [
{ "mDataProp": il },
{ "mDataProp": ilce },
{ "mDataProp": koy },
{ "mDataProp": nakil }
]
[/code]
right?
http://www.datatables.net/ref#mDataProp
as
[object Object],[object Object],[object Object]
also
"aaData": jsonData
as:
[{"hey_no":0,"list_gmaplat":30.91122037132634,"list_gmaplong":40.75985746149354,"nakil":9,"il":"duzce","ilce":"golyaka","koy":"degirmentepe"},
....
]
all failed