Add columns in the middle of server side table
Add columns in the middle of server side table
I was using local tables before, now im changing everything to server side and i found a problem i couldnt solve..
im trying to add columns in the middle of the table that are not on the server DB..
for example
DB table has columns X,Y,W,Z
Loaded table has X,Y,W+Z,W,Z
i can add them fine if i put them in the end , like this X,Y,W,Z,W+Z.
i do this by adding an empty string on the column array that is passed to the server and adding the values to the line right after the loop that is putting everything on aaData.
i dont know if was clear enough, but can someone help me out.
thanks!!!
im trying to add columns in the middle of the table that are not on the server DB..
for example
DB table has columns X,Y,W,Z
Loaded table has X,Y,W+Z,W,Z
i can add them fine if i put them in the end , like this X,Y,W,Z,W+Z.
i do this by adding an empty string on the column array that is passed to the server and adding the values to the line right after the loop that is putting everything on aaData.
i dont know if was clear enough, but can someone help me out.
thanks!!!
This discussion has been closed.
Replies
i try this
$aColumns = array( 'column1', 'column1', 'column1','' );
or
$aColumns = array( 'column1', 'column1', 'column1',' ' );
or
$aColumns = array( 'column1', 'column1', 'column1',' action' );
html:
column1
column2
column3
action
and im getting error
'DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.'
where im wrong ? Thank you