Search
19011 results 671-680
Forum
- 24th Mar 2012Create and remove DataTable dynamicallyHave you looked at the bDestroy or fnDestroy options to remove the old DataTable, and then you can initialise a new one in its place? Allan
- 23rd Feb 2012Moving rows between datatables. Can't create jQuery generated row added by fnAddTrHi Allan, After I posted this, I realized I was also having some weird indexing issues, where if I added rows from more than one page of the pre-populated table (which only shows 5 entries at a time) using fnAddTr, and then deleted them, fnDeleteRow(pos) would delete rows from actTable (their current table) based on the position of that row before it had been deleted from availTable (the original table) relative to pagination. So, for example, if I added the first row off of each page of availTable, and then went and deleted one of them from actTable, they would all be removed. But only one would reappear in availTable. So, last night, after I posted I went back and reworked my code to use fnAddData instead of fnAddTr. And that took care of all my issues. So I will probably stick with that for the time being, but next time I'm moving things back and forth I will take a look at the updated fnAddTr plugin. Otherwise this has been a fantastic product for me. Thank you!
- 14th Feb 2012how to create combobox in tablei hope this will help. if not i will post the code.
- 17th Oct 2011Populate / Create a second datatable from the results of a different tabledatatable 1 and datatable 2 are completely different tables in html/datatables. it sounds like they will be completely different tables in the database as well. table 1 lists all orders table 2 allows you to list all parts of an order (all rows in table 2 that have a reference in some field to an order number) the call to oTable2.fnFilter() would be in whatever handler you are using to detect the user clicking on a row in oTable1. likely it is not specified within the initialization object of table1, but something like: [code] $(document).ready( function () { oTable1 = $('#table1').dataTable( // .... ); oTable2 = $('#table2').dataTable( // .... ); $('#table1 tbody tr').live('click', function() { // find the order number (I'm assuming it's in column 0 of every row) aData = oTable1.fnGetData(this); sOrder = aData[0]; // filter table 1 with this order number (assuming order number is in col 4 of table 2) oTable2.fnFilter(sOrder, 4); }) });[/code]
- 27th Jul 2011create a table with 1 column containing 2 headersfbas: That is very unfortunate if i cannot do that. I am converting a different table implementation that supports this, and it would be a show stopper if i cant hack datatables to do this. what about my original idea of adding a 3rd 1px high header row with the column widths i require? This will probably break sort listener binding, but i can probably fix that by manually binding the sort listeners via the sort API.
- 27th May 2011Can I Create a Progress Bar or similar?Yes, well I'm a duffer, aren't I? It's all in the "processing" functionality built in to Datatables already. Works beautifully.
- 18th May 2011Help to create events with full number pagingHi allan, thanks for your suggestion, but I have solved it (my problem) with a differnet approach, I simply added a function call in the dataTables code itself [code] U=function(){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;m(g);PageChanged(this.innerHTML*1-1);return false} [/code] in my other js file I have the function: [code] function PageChanged(target) { alert('new Target' + target); } [/code] Since you took the time to post a solution, I tested it, no success. Is it possible that two 'click' events are the problem? if I use: [code] $('.paging_full_numbers').unbind('click').bind('click', function () { alert('click'); }); [/code] I get the alert message, but of course the page will not be chnaged :)
- 18th Apr 2011How can I create a separate link to sort dat in columnsGreat it works fine , but now I am stuck on some other issue , I have applied a css class 'sorting_1' to td of table , but they are visible in first page only var oDataTable=$('#jobs').dataTable(); oDataTable.fnSort( [[2,"desc"]]); // call the sort $('#jobs td').addClass('sorting_1'); But how can I add this code for paging button, as well as select change [10/20/....] $('#jobs td').addClass('sorting_1
- 5th Sep 2010How to create unsortable column?Yeah :D Love you mestre :* and sorry for misunderstanding. Pawe?
- 22nd Jul 2010Don't draw on createI already tried to not set the source file until I want to call the fnDraw() function but it will still try to draw itself and because it has no source it throws a 404 error. Solved it, used an if statement in the "fnServerData": function (sSource, aoData, fnCallback) { ... }