Search
43625 results 7051-7060
Forum
- 25th Oct 2011Comparing two table valuesDo the rows have some kind of unique id column you can use to look them up? If so you can do something like this: [code] var mainTable = $('#mainTableId').dataTable(); var windowTable = $('#windowTableId').dataTable(); var allDataInMainTable = mainTable.fnGetData(); var allDataInWindowTable = windowTable.fnGetData(); for (var i in allDataInMainTable) { var mainData = allDataInMainTable[i]; for (var j in allDataInWindowTable) { var windowData = allDataInWindowTable[j]' if (mainData.id == windowData.id) mainWindow.fnUpdate(windowData, i); } } [/code] If they don't have a column with a unique id you would have to do something other than "mainData.id == windowData.id" to tell if they were the same row. Personally I would use something like Backbone.js models and have the grids bind to change events to keep themselves in sync, though if you aren't already using backbone doing something like that is probably overkill for what you are trying to accomplish.
- 20th Oct 2011How do I manually edit the theming/formatting of a table?Nevermind, I got it. Apparently another developer was including some other stuff in a different file. I tracked it down and removed it. Thanks again!
- 10th Oct 2011Extra data and table redraw problemProblem is solved.
- 3rd Oct 2011Table sorting issueHi Peter, I want to say thanks very much for the creator of the plugin. It is very useful. My pleasure - great to hear that you are finding it useful! For your question - what you want to do is use the natural sorting plug-in: http://datatables.net/plug-ins/sorting#natrual . That will "chunk" your data to have it sorted as you would expect. Allan
- 22nd Sep 2011Removing whitespace in table headersAllan, Just to give you a heads up - I tried the 1.8.3.dev file that's currently on the site and it still does this for me in the header and footer. Plus, I found that if I added the following at line 2817: [code] anCells[i].innerHTML = $.trim(anCells[i].innerHTML); [/code] If got rid of the extra spaces in the footer cells. Hope that helps.
- 30th Aug 2011formatting: Totals or table data?They are text string - that's why :-). If you what DataTables to treat them as numbers, you would need to use a sorting plugin such as this one: http://datatables.net/plug-ins/sorting#formatted_numbers Allan
- 7th Aug 2011Column resizes outside table bounds?PLease see this thread which covers a similar topic: http://datatables.net/forums/discussion/6073 . Allan
- 28th Jul 2011Hidden table rows not selectable with jQuery?Update: I found a way around the problem by putting the style="display:none"; directly in the td and th html and making the bVisible true for this column. I'm still kind of curious about this though--seems a bit ugly to solve in either of the two ways I could think of.
- 29th Jun 2011Table designI've added a reply to your original question here: http://datatables.net/forums/discussion/comment/22417#Comment_22417 Allan
- 21st Jun 2011[v1.6.2] hidden row information in table with new queryHi, had the same problem, thanks to your help i got it to work within minutes :) [code] function fnFormatDetails(nTr) { var aData = oT.fnGetData(nTr); var sOut; $.ajax({ url: 'yourServiceURL', data: '{}', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (result) { sOut = 'Detailed information: ' + result; oT.fnOpen(nTr, sOut, 'details'); } }); } [/code]