Search
18504 results 2931-2940
Forum
- 21st Jun 2014How to retrieve the data from sqlserver database using DATATABLES through ajax service callsCode in VB.net
- 20th Jun 2014How do I change column titles based on the data received from AjaxI am including a reload button in my DataTable that does table.ajax.reload(). I want to change the column name once I receive this data. I have an integer column in the title of which I always want to indicate the sum of all values in that column. For example if the column title was Foo and the values loaded were [3,4,5] then I would like my column title to become Foo [12]. How can I do this?
- 19th Jun 2014Lost formatting after updating table headers from ajax requestHere's the scenario: I load up a form with some generic headers. I'd prefer to load no headers and just hide the datatable for now. The client fills out the form and based on what checkbox they select a different results set AND results header is returned. I don't know what the headers will be until after they submit the form. Once they submit i use a $("#resultsHeader").replaceWith() to update the header columns of the datatable. Now I lose all my datatable styles and nothing seems to work. I have tried fnDestroy() and fnUpdate and nothing seems to work. you can see all my code at: http://jsfiddle.net/j7mQd/
- 14th Jun 2014How to access each row value in datatable when using ajaxMyDatatable Row1val1 | Row1val2 | Row1val3 | Row1Total Row2val1 | Row2val2 | Row2val3 | Row2Total Row3val1 | Row3val2 | Row3val3 | Row3Total Row4val1 | Row4val2 | Row4val3 | Row4Total .... | SUM(RowTotals) I want rowtatal using Ajax...how to get it???
- 19th May 2014Get ajax to load when json source doesn't have a data wrapperHi, I have DataTables set up correctly and working with a hard-coded JSON source. However, in my real-life application I have to use a JSON feed which I can't control. This JSON feed has the following format: [ { "adminNotificationTypeId" : 11, "customerId" : 0, "dateTime" : "2014-05-15T20:16:00Z", "dateTimeClosed" : "0001-01-01T00:00:00" }, { "adminNotificationTypeId" : 7, "customerId" : 0, "dateTime" : "2014-05-06T11:31:00Z", "dateTimeClosed" : "0001-01-01T00:00:00" }, { "adminNotificationTypeId" : 7, "customerId" : 0, "dateTime" : "2014-05-06T11:31:00Z", "dateTimeClosed" : "0001-01-01T00:00:00" } ] DataTable doesn't seem to like this as it's missing the wrapping 'data' JSON object. I wondered if there's a way to get DataTables to consume this feed? Many thanks folks.
- 11th May 2014Changing column size using ajax sourced dataI think I have tried every combination of trying to change the column widths for my table. I would like less padding. I have commented out the /* width: 100%; */ in jquery.dataTables.css. Added "bAutoWidth": false. to the init, tried "sWidth": "10%",in the data sections of the the init. Is it possible to slightly change the column widths?
- 5th May 2014How to post subit using ajaxHi, I tried to modify the '$('#form').submit( function()' in the example form.html to post submit the marked checkboxes to a database. http://live.datatables.net/qoteqif/2/edit How would it be properly made? As it is now, it works, but I can't show the text of the 'success: function()'. Of course I could use the 'alert' to show it... Thank you Joseph
- 21st Mar 2014Ajax into fnFormatDetails functionI have this code: [code] function fnFormatDetails ( oTable, nTr ) { var aData = oTable.fnGetData( nTr ); $.post('php/clientes/clientes.php', {id:'details',ric:aData[2]} , function(respuesta) { console.log(respuesta); data = JSON.parse(respuesta); var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">'; sOut += '<tr><td>Razón Social:</td><td>'+data[0]+'</td></tr>'; sOut += '<tr><td>CUIT:</td><td>'+data[1]+'</td></tr>'; sOut += '<tr><td>Dirección:</td><td>' + data[2] + ' ' + data[3] + ', ' + data[6] + ', ' + data[5] + ', ' + data[4] + '.</td></tr>'; sOut += '<tr><td>Codigo Postal:</td><td>'+data[7]+'</td></tr>'; sOut += '<tr><td>Coordenadas GPS:</td><td>Latitud (' + data[8] + ') - Longitud (' + data[9] + ')</td></tr>'; sOut += '</table>'; return sOut; }); } [/code] My problem is, when I press the button "More details" the fnFormatDetails function is call, into the console log I can see information send by my PHP but these extra details is not displayed in my HTML.
- 7th Mar 2014Modifying columns after ajax, before showWhat is the best way how to modify row column content, e.g. add a button? Now I am doing it with: "fnRowCallback" : function(nRow, aData, iDisplayIndex, iDisplayIndexFull) { $('td:eq(0)', nRow).html(... $('td:eq(1)', nRow).html(... DataTables load is very slow when I use this way. Is there any better way? I want to be able to add some buttons, input and so on. I'm using "bProcessing" : true, "bDeferRender" : true. Thank you
- 8th Jan 2014fnAdjustColumnSizing requeries AJAX sourceredacted -- from forum searches, it appears that this is indeed by design