Search
43632 results 7331-7340
Forum
- 26th Sep 2012To Select and Deselect Displayed Items in table.Hi, I am using check box to each of the row to select that row . And also having a checkbox in that column Header to select all the row which are displaying . If there is a 5 out of 10 records are displaying I need to select those 5 record only when i am clicking on Header checkbox and also check Box must get checked of those 5 records. If there is option in the script Please help me solve this issue . thanks in advance. Thanks & Regards , Thamaraiselvan
- 24th Sep 2012Data table support with checkbox coming from Struts 2 IteratorHi As the Title suggests i need to find out if sort function is enabled will datatables support checkbox generated from Struts 2 tag more specifically from Iterator can u give me an example which i can refer
- 23rd Sep 2012Joined table JSON data looks partially duplicated. Is that needed? (and related questions)I just got back to my DataTables editor project and still have some work to do to figure out how the JSON for joined tables is made and especially used. Is duplication of these rows required? (two copies of "Printer" value) [code] "access":[ { "value":"1", "0":"1", "label":"Printer", "1":"Printer" } ] [/code] Or here: ("Printer" and a numeric id, same as above) Should mData be used to read from the above object here instead of repeating it? [code] { "DT_RowId": "row_8", "first_name": "Bryar", "last_name": "Long", "dept": { "id": "1", "name": "IT" }, "access": [ { "id": "1", "name": "Printer" } ], "extra": { } }, [/code] I find duplication inherently confusing. What happens if "label":"Printer" is changed to "label":"snarfblat", for example? There are still other copies with the text, "Printer". Where is the "label" key from the "access" object (the one at the top of this post) used? Sorry, I'm having a really hard time with this. As I mentioned in a previous post, I don't use PHP so have to generate the JSON manually.
- 3rd Aug 2012Data Table row cell colouringHi, I am new to datatable. I will be thankful if somebody help me reqarding the below request. Problem : There is a requirement in which i needs to display the certain data in a cell of a row in different colour so that when user do the sorting or filtering of that coloumn the colour coading will be visible and make Row of data standout. Thanks for your quick response.
- 29th Jul 2012table tools printing, but nothing elsesee: http://property2.webbox.co.za/template/velocityOnly,DataTables.vm print button works, but none of the others do. would very much appreciate someone telling me what i'm doing wrong. http://debug.datatables.net/awesev thanks in advance
- 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?