Detail Popup window
Detail Popup window
Hi,
I have a server-sided datatable which works fine. It displays a mysql data set which contains 30 data fields in each row. Because I cant show all 30 fields in the table (not enough place on the screen), I only show the first 5 data fields and I now want to show a popup detail window (div) when the user clicks on a tableview row which shows all the 30 data fields.
For this I first need the data from all 30 fields. I thought the easiest way would be to add the data to the server php script output and then get this output on the client and display my window from.
But I cant find out how to access the json data the data table received via Ajax. I also tried to use fnGetTds() but this only gives me the 5 columns. Mayby I must create invisible columns for the other 25 fields but I cant figure out how.
thanks for help
Claus
I have a server-sided datatable which works fine. It displays a mysql data set which contains 30 data fields in each row. Because I cant show all 30 fields in the table (not enough place on the screen), I only show the first 5 data fields and I now want to show a popup detail window (div) when the user clicks on a tableview row which shows all the 30 data fields.
For this I first need the data from all 30 fields. I thought the easiest way would be to add the data to the server php script output and then get this output on the client and display my window from.
But I cant find out how to access the json data the data table received via Ajax. I also tried to use fnGetTds() but this only gives me the 5 columns. Mayby I must create invisible columns for the other 25 fields but I cant figure out how.
thanks for help
Claus
This discussion has been closed.
Replies
Allan
[code]
$(document).ready(function() {
oTable = $('#userTable').dataTable();
oTable.$('tr').click( function ()
{
alert("Test");
} );
} );
[/code]
does not give me an alert anyway. What could be a reason why the click function ist not called?
[code]
$('#userTable tbody').click(function(event)
{
alert("Test");
});
[/code]
works fine?
Thanks
Claus
[code]
$('#userTable tbody').on( 'click', 'tr', function () {
} );
[/code]
Please link to a test case in future so we can say for sure: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
Allan
That looks fine. Now I get all fields with fnGetData().
Claus