Not really in 1.9, but in 1.10 (which is heading towards beta soon!) the child row options have been improved, so yes it would be possible there. You'd need to do a little bit of coding to get it to work.
The documentation for how the child rows in 1.10 is written, but not yet published. However, the final example in this file might help: https://github.com/DataTables/DataTablesSrc/blob/1_10_wip/docs/api/row().child().xml
You can return it any way you want and then use mData to have DataTables consume the data: http://datatables.net/blog/Extended_data_source_options_with_DataTables
Nothing I don't think - other than to have it read your database. All the configuration you need to do would be done on the client-side in Javascript using the row details, like in the example I linked to before.
[code]/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/[/code]
When using space it returns the following in Ajax response:
Hi, I tried before with zero configuration and was generating rows through php while loop.
However, it took more 20 seconds for page to load and sometimes the browser didn't respond.
This is the reason I moved to Server side.
I have tried an empty string. However, that seems not to be working either. Just shows the same error as posted above.
Yup - looking at that script, it looks like there isn't the str_replace that would be needed for the space to be correctly handled.
To be honest, I would recommend forgetting that script and using one for objects instead: https://github.com/DataTables/DataTables/blob/master/examples/server_side/scripts/objects.php . Use mData as described in the blog post I pasted above, then you don't need to use space in the column list at all.
Replies
The documentation for how the child rows in 1.10 is written, but not yet published. However, the final example in this file might help: https://github.com/DataTables/DataTablesSrc/blob/1_10_wip/docs/api/row().child().xml
Allan
Will look into it
Regards,
Vrutin
[code]
{
"aaData": [
[
"10131",
"Ultrasonic Cleaner",
"AT,BE,DK,FI,FR,DE,IE,IT,NL,NO,NOVO,PT,ES,SE,CH,UK",
"test.test",
null,
"0",
"1",
"1",
null,
null,
null,
null
]
]
}
[/code]
http://datatables.net/release-datatables/examples/data_sources/server_side.html
what would I change in that php file you created allan?
Regards,
Vrutin
Allan
* you want to insert a non-database field (for example a counter or static image)
*/[/code]
When using space it returns the following in Ajax response:
$aColumns = array(" ", "job_no", "job_name", "region");
Ajax Error: Unknown column '' in 'field list'
Regards,
Vrutin
Do you actually need server-sid processing btw? How many rows are you using? You should only need server-side processing if you are using >50'000.
Allan
However, it took more 20 seconds for page to load and sometimes the browser didn't respond.
This is the reason I moved to Server side.
I have tried an empty string. However, that seems not to be working either. Just shows the same error as posted above.
Regards,
Vrutin
To be honest, I would recommend forgetting that script and using one for objects instead: https://github.com/DataTables/DataTables/blob/master/examples/server_side/scripts/objects.php . Use mData as described in the blog post I pasted above, then you don't need to use space in the column list at all.
Allan