jQuery DataTables fnGetData -
i using jquery datatables 1.10 plugin. in before version, (1.9.4 plugin) able info table this:
var ipos = otable.fngetposition( ); var adata = otable.fngetdata( ipos );
now, using same code, getting error
typeerror: adata null
how can utilize new functionallity? tried using otable.row(ipos).data()
didn't worked me
you're trying access 1.10 api older api methods. fngetdata has been deprecated, you're seeing. starters, hungarian notation (mdata, fnredraw) gone.....it's time!
the new method pretty straightforward:
example info clicked cell:
var table = $('#example').datatable(); $('#example tbody').on( 'click', 'td', function () { var celldata = table.cell( ).data(); } );
example info clicked row:
var table = $('#example').datatable(); $('#example tbody').on( 'click', 'tr', function () { var rowdata = table.row( ).data(); } );
here's api reference other questions. might benefit the api conversion guide, can old functions , see new equivalents.
jquery datatables
No comments:
Post a Comment