2

I'm new to DataTables so accept my apologies if this is silly...

I'm trying to integrate datatables on the intel xdk app framework. While the datatable expands the vertical length of the div it doesn't expand the horizontal length and I can't seem to scroll. Here is the code.

I'm not sure how to provide an example for the xdk app framework but if someone let's me know I'm glad to post.

Thanks!

Addendum:

I don't know if this will help, but if you hit the table just right it scrolls. It's almost like it's not registering the click or something else is registering it on a top layer. Every one in 10/20 tries though it scrolls correctly. It almost appears that the app framework is not passing control/focus to the DataTable correctly. How can I fix that? Hopefully that helps someone!

   var table = $('#table').dataTable( {
        "symbol": symbol,
        "exchange": exchange,
        "aoColumns": columnData,
        "aoColumnDefs": [
        { "aTargets": [0],      "mRender": function (data, type, full) {return dateFormat(data)} },
        { "aTargets": [1],      "mRender": function (data, type, full) {return numberWithCommas(data)} },
        { "aTargets": ["_all"], "mRender": function (data, type, full) {return numberWithCommas(parseFloat(data).toFixed(2))} },
        ],
        "aaSorting": [[ 0, "desc" ]],
        "bPaginate": false,
        "bLengthChange": false,
        "bFilter": false,
        "bInfo": false,
        "bAutoWidth": false,
        "bProcessing": true,
        "sScrollX": "100%",
        "bScrollCollapse": true,
        "bServerSide": true,
        "sAjaxSource": str,
        "bDeferRender": true,
        "fnServerData": function( sUrl, aoData, fnCallback ) {
            $.ajax( {
                "url": sUrl,
                "data": aoData,
                "success": fnCallback,
                "dataType": "jsonp",
                "cache": false
            } );
        }
    } );
user1357015
  • 11,168
  • 22
  • 66
  • 111

1 Answers1

0

In App Framework 2.1, we provided a way to use jQuery and App Framework UI without conflicts. Instead of using appframework.js. We have created a jQuery* plugin called jq.appframework.js.

To use the plugin, include jQuery* first, then jq.appframework.js and finally appframework.ui.js (not the minified version).

 <script src="jquery.js"></script>
 <script src="jq.appframework.js"></script>
 <script src="appframework.ui.js"></script>

https://raw.githubusercontent.com/01org/appframework/master/jq.appframework.js https://raw.githubusercontent.com/01org/appframework/master/ui/appframework.ui.js

Are you using an unminified version of jQuery?

mnementh
  • 251
  • 1
  • 4