Search
43861 results 7371-7380
Forum
- 26th Jul 2012Need to use ajax server rendering with empty tableUsing server side processing I need to render column headings on the fly with some kind of callback when the ajax call is successful. I searched and found this: http://datatables.net/forums/discussion/3442/x&page=1#Item_10 But this will break the server side rendering. Something like this: [code] Untitled Document var display_options = {"wo_status":"Status","wo_number":"WO #","org_wo_num":"PPW #","date_created_print":"Date Created","date_received_print":"Date Received","ready_submission_date_print":"Ready Office","date_due_print":"Date Due","date_due_client_print":"Client Date Due","date_complete_estimate_print":"Estimated Complete Date","date_cancel_print":"Cancel Date","client_company_name":"Client","customer_name":"Customer","loan_number":"Loan #","loan_type":"Loan Type","address":"Address","city":"City","state":"State","zip":"Zip","county":"County","lot_size":"Lot Size","lock_code":"Lock Code","inspector_name":"Contractor","category_name":"Category","admin_name":"Admin","work_type_name":"Work Type","invoice_num":"Invoice #","invoice_date_print":"Invoice Date","photos":"Photos"}; var oTable = jq('#work_orders').dataTable({ "bStateSave": true, //"aaData": json_arr, //"aoColumns": aoColumns, "bDeferRender": true, "bProcessing": true, "bServerSide": true, "sAjaxSource": '', // Need a function like this to render column headings before further processing "fnAjaxSuccess": function(aoData){ //Loop through headings sent from aoData var columns = []; // Look at first row sent down for columns for (column in aoData[0]){ columns.push(column); } //Loop through sent headings, create aoColumns for (var i=0;i -1) ? 'us_date' : ''; //oColumn.sDefaultContent = 'TEST'; oColumn.fnCreatedCell = function (nTd, sData, oData, iRow, iCol) { //jq(nTd).wrapInner(''); } if (typeof oColumn.sTitle != "undefined"){ oColumn.sTitle = oColumn.sTitle.replace(/(]+)>)/ig," "); } oColumn.bVisible = (jQuery.inArray(columns[i], hidden_columns) > -1) ? false : true; oColumn.bSearchable = true; aoColumns.push(oColumn); } } }); [/code]
- 9th Jul 2012Setting table default valsI have a page that contains several different tables, and rather than having them all initialized separately I'm trying to set some defaults. I guess I'm doing something wrong, but I'm not sure what it is. Here's my version on live.datatables: http://live.datatables.net/exosaw/8 [code] $.extend( $.fn.dataTable.defaults, { "bSort": true, "oLanguage": { "sEmptyTable": "No values found." } }); doOtherStuff(); function doOtherStuff() { var tbl = $('#example').dataTable( { "bPaginate": true, "sPaginationType": "full_numbers", "bProcessing": true, "sDom": '<"top"flp><"controls">t<"bottom"ri>', "bSaveState": true }); } [/code] I just can't get the pagination to work, and it's baffling me. What am I doing wrong? Thanks!
- 8th Jul 2012Confused about how to sort my table when a column contains an inputI checked out all the links and found the following [code] /* Create an array with the values of all the input boxes in a column */ $.fn.dataTableExt.afnSortData['dom-text'] = function (oSettings, iColumn) { var aData = []; $('td:eq(' + iColumn + ') input', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () { aData.push(this.value); }); return aData; } [/code] Well I have some standard code that is used for all my different tables. The tables have all different combinations of columns. My question is what do I do next. I created this function but how do I apply it? What do I do next. I saw the following: [code] $('#example').dataTable( { "aoColumns": [ null, null, { "sSortDataType": "dom-text" }, { "sSortDataType": "dom-text", "sType": "numeric" }, { "sSortDataType": "dom-select" }, { "sSortDataType": "dom-checkbox" } ] } ); [/code] BUT I am using the same refresh code for different tables. Is there some way that I can tell dataTables how to sort by adding a class to the element of a column? Here is what the td of the column I want to sort looks like: [code] [/code]
- 4th Jul 2012Table tools v1.9.1 csv/excel/pdf do not work after refresh the data in the datatableExport is working when I load the data to the datatable first time. However, they are not working anymore after I click another button to reload the data. I got error message when I click the "Save" button: Cannot set property 'width' of undefined -------------------- ZeroClipboard.js:156. It looks like "var flash = this.div.childNodes[0];" is undefined for the three buttons after reload the data.
- 3rd Jul 2012Updating JQuery dataTable table outside itselfI managed to get jquery datatables plugin to work with asp.net mvc 3 so it posts back json, and with a search function. Problem now I that I need to move the search box and add a "language" filter outside it's "normal" position next to a custom made menu. Is there a way that I can integrate: Language: <select name="languageid"> <option value="SV">Swedish</option> <option value="EN">English</option> </select> Keywords: <input type="text" name="keywords"> To refresh datatables when languageid or keywords change? and still have sorting, paging working?
- 13th Jun 2012FixedHeader with Table CaptionSee this page for an example of the problem: http://live.datatables.net/ivazek
- 17th May 2012problem footer tablehello, could you help me solve this problem? http://www.subirimagenes.com/imagen-capturadepantalla-7695201.html [code] listarreserva = $('.listarreserva').dataTable( { "bJQueryUI": true, "sScrollY": "450px", "bPaginate": false, "bScrollCollapse": true, "aoColumns": [ { sWidth: '10%' }, { sWidth: '20%' }, { sWidth: '10%' }, { sWidth: '10%' }, { sWidth: '5%' }, { sWidth: '10%'}, { sWidth: '35%'} ], "oLanguage": { "sProcessing": "Procesando...", "sLengthMenu": "Mostrar MENU registros", "sZeroRecords": "No se encontraron resultados", "sInfo": "Mostrando desde START hasta END de TOTAL registros", "sInfoEmpty": "No existen registros", "sInfoFiltered": "(filtrado de un total de MAX líneas)", "sInfoPostFix": "", "sSearch": "Buscar:", "sUrl": "", "oPaginate": { "sFirst": "Primero", "sPrevious": "Anterior", "sNext": "Siguiente", "sLast": "Último" } } } ) [/code] thanks
- 14th May 2012problem footer table flotinghello, could you help me solve this problem? http://www.subirimagenes.com/imagen-capturadepantalla-7695201.html code: listarreserva = $('.listarreserva').dataTable( { "bJQueryUI": true, "sScrollY": "450px", "bPaginate": false, "bScrollCollapse": true, "aoColumns": [ { sWidth: '10%' }, { sWidth: '20%' }, { sWidth: '10%' }, { sWidth: '10%' }, { sWidth: '5%' }, { sWidth: '10%'}, { sWidth: '35%'} ], "oLanguage": { "sProcessing": "Procesando...", "sLengthMenu": "Mostrar MENU registros", "sZeroRecords": "No se encontraron resultados", "sInfo": "Mostrando desde START hasta END de TOTAL registros", "sInfoEmpty": "No existen registros", "sInfoFiltered": "(filtrado de un total de MAX líneas)", "sInfoPostFix": "", "sSearch": "Buscar:", "sUrl": "", "oPaginate": { "sFirst": "Primero", "sPrevious": "Anterior", "sNext": "Siguiente", "sLast": "Último" } } } ) thanks
- 9th Apr 2012How to search data not display in tabletable_display id,name, add Values( 555,andy,12/dcc blah2..) data display (name , add )// i can search name & add how can i search id, id field dont display
- 3rd Apr 2012Transpose Child Table / Left Column-Right ValuesI recently stumbled across the forum addressing this issue (http://datatables.net/forums/discussion/5992/rotate-table/p1) but the link to the .zip file is invalid and my attempts so far have failed. Basically, my Parent/Child is really Parent/Parent-Details, therefore I have the need to tranpose the columns on the child so they appear on the left and their associated values on the right. Is there support for this and I am missing it? Has anyone else successfully accomplished this? Thanks, Jack