Search
3636 results 191-200
Forum
- 19th Oct 2015Bug Row selected when opening a row in responsive modeHi, I wonder if this issue has been fixed https://datatables.net/forums/discussion/22822/bug-row-is-selected-when-i-open-the-detail-row-using-responsive-with-tabletools Thanks a lot!
- 8th Apr 2015How to avoid default submit (post data call) on enter key down in edit mode of a row?Hi Folks, just messed up with handling the usecase when i hit enter while editing a row in editor. I want to avoid calling submit() as i have custom save controls with each line. Please HELP.
- 25th Feb 2015How to work with datatables in an ajax server mode ?Hi, I have data records containing a lot of rows (hundreds of thousands...) so I am trying to implement dataTables using with an ajax call to bring only a few on each call. I don't seem to find a documentation regarding the query params that I can access in the server Request. for example: which column is the sorted one ? what is the requested page ? etc...
- 23rd Dec 2014Delete mode should display the selected the row - first column value?grid records displaying with check box, after the select one record and clicked the delete button, then how to display the selected row first column value in delete confirmation message?
- 11th Dec 2014to Export columns in collection modeWhen i use tabletool plugin's collection option ( "sExtends": "collection" ) , i cannot filter the columns with the help of the mColumns option. When this code below works. { "sExtends": "pdf", "sButtonText": "Special columns", "mColumns": [ 1, 4 ] } This code below doesn t work. { "sExtends": "collection", "sButtonText": "Export", "aButtons": [ "csv", "xls", "pdf" ], "mColumns": [ 1, 4 ] } Thx in advance for your answers.
- 24th Sep 2014'fnSetColumnVis' with 'multipleCheckOnly' selection modeHi, I'm using fnSetColumnVis to show/hide multiple columns when a radio button is switched. My table also uses the sSelectionMode of 'multipleCheckOnly' which automatically creates a checkbox column to allow selection of rows within the table. This checkbox column has a column header on it that also has a checkbox, that selects all rows when checked. My problem is that, when I show/hide any columns with fnSetColumnVis, the default checkbox column header disappears. Column [0] is my first column, not the checkbox column, so I'm not able to control it's visibility. The column itself doesn't disappear, just the header.. Is there any way to ensure this checkbox column header won't be hidden when hiding other columns? Here is how my datatable is set up: parentDataTable = config.selectors.$parentDataTable.dataTable({ sDom: "<'$#table-header'>tr<'dataTables-footer'silp>", sSelectionMode: 'multipleCheckOnly', aoColumns: [ { "sProperty": "TitleCode" }, { "sProperty": "Issue" }, { "sProperty": "JobNumber" }, { "sProperty": "CycleId", "bVisible": false }, { "sProperty": "TotalQuantity" }, { "sProperty": "StartShipDateAsString" }, { "sProperty": "InHomeRange" } ] }); And here is how I'm showing/hiding columns when the radio button is switched: var showSelectedColumns = function (selectedValue) { if (selectedValue == "inhome") { parentDataTable.fnSetColumnVis(3, false, false); parentDataTable.fnSetColumnVis(0, true, false); parentDataTable.fnSetColumnVis(1, true, false); parentDataTable.fnSetColumnVis(2, true, false); } if (selectedValue == "cycle") { parentDataTable.fnSetColumnVis(0, false, false); parentDataTable.fnSetColumnVis(1, false, false); parentDataTable.fnSetColumnVis(2, false, false); parentDataTable.fnSetColumnVis(3, true, false); } parentDataTable.fnAdjustColumnSizing(); }; Here is what the table looks like before showing/hiding any columns: http://i.imgur.com/6W6Ea9B.png And here it is after showing and then hiding the columns. Notice the checkbox column header is missing: http://i.imgur.com/on7XGmx.png Any help is appreciated! Thanks!
- 1st Jul 2014Does anyone have Idea why is this not working under IE10 document mode IE8The second one doesnt work $grid doesn't contain function gnGetData() -> $grid is a instance from dataTables jQuery("#example tr").bind('dblclick',function(event){ var id = $grid.fnGetData(this)[0]; Xrm.Utility.openEntityForm(config.sx_entity,id,null) }); // $grid.bind('dblclick', 'tr', function(event){ // var id = $grid.fnGetData(this)[0]; // Xrm.Utility.openEntityForm(config.sx_entity,id,null) // });
- 13th Jun 2014reading searches and filters when in client-side mode?So we're having to reconstruct something a little like "infinite scrolling"; we need to keep searching and filtering on the backend, but our API cant return fixed number of rows that Scroller needs, and each individual query takes too long for that to work well. So the plan is to load a big hunk of data, and then provide a button to add more data. Is there a way to read the information that the ajax callback used to get, the stuff outlined in http://datatables.net/manual/server-side ? in particular the columns and order params?
- 2nd Jan 2014Highlighting Rows and Columns in Rowgrouping mode (not the plugin)I am trying desperately :) to get this to work but it's not working.. that means highlighting rows or columns!! and if it's possible to change their other css such as font-color? thanks this is the code: [code] $(document).ready(function () { var gs_array = new Array(); $.getJSON("https://spreadsheets.google.com/feeds/list/0AovTwC7nfGXAdG1yQ29KYkhpRjZ3ejFQVk5VZEZOS2c/od6/public/values?alt=json-in-script&gid=0", function (data) { gs_array = data; }); var oTable = $('#critic').dataTable({ "bServerSide": false, "bProcessing": true, "sAjaxDataProp": "feed.entry", "sAjaxSource": "https://spreadsheets.google.com/feeds/list/0AovTwC7nfGXAdG1yQ29KYkhpRjZ3ejFQVk5VZEZOS2c/od6/public/values?alt=json", "aoColumns": [ { "mDataProp": null, "sClass": "control center", "sDefaultContent": '' }, { "mDataProp": "gsx$name.$t" }, { "mDataProp": "gsx$haaretz.$t" }, { "mDataProp": "gsx$galatz.$t" }, { "mDataProp": "gsx$yediot.$t" }, { "mDataProp": "gsx$walla.$t" }, { "mDataProp": "gsx$pnai.$t" }, { "mDataProp": "gsx$sof.$t" }, { "mDataProp": "gsx$israel.$t" }, { "mDataProp": "gsx$average.$t"} ], "fnDrawCallback": function (oSettings) { /*some function here*/ }, "aaSortingFixed": [[0, 'asc']], "aaSorting": [[9, 'desc']], "sDom": 'lfrip', "bPaginate": false, "bLengthChange": false, "bFilter": false, "bSort": true, "bInfo": false, "bSortClasses": false, "aoColumnDefs": [ { "mRender": function (data, type, row) { img_str = ''; return img_str; }, "aTargets": [9, 8, 7, 6, 5, 4, 3, 2] }, { "bVisible": true, "aTargets": [0] }, { "sClass" : "center" , "aTargets": [9, 8, 7, 6, 5, 4, 3, 2] } ] }); // this is not working!!! oTable.$('td').hover(function () { var iCol = $('td', this.parentNode).index(this) % 5; $('td:nth-child(' + (iCol + 1) + ')', oTable.$('tr')).addClass('highlighted'); }, function () { oTable.$('td.highlighted').removeClass('highlighted'); }); // var anOpen = []; $('#critic td.control').live('click', function () { console.log('click'); var nTr = this.parentNode; var i = $.inArray(nTr, anOpen); $(anOpen).each(function () { if (this !== nTr) { $('.innerDetails').animate({ opacity: 0 }); $('td.control', this).click(); } }); if (i === -1) { $('img', this).attr('src', "images/details_close.png"); var nDetailsRow = oTable.fnOpen(nTr, fnFormatDetails(oTable, nTr), 'details'); $('div.innerDetails', nDetailsRow).slideDown('fast', function () { $("div.dataTables_scrollBody").scrollTop(nTr.offsetTop); }); anOpen.push(nTr); } else { $('img', this).attr('src', "images/details_open.png"); $('.innerDetails').animate({ opacity: 0 }, 150); $('div.innerDetails', $(nTr).next()[0]).slideUp(function () { oTable.fnClose(nTr); anOpen.splice(i, 1); }); } }); function fnFormatDetails(oTable, nTr, gs_array) { var oData = oTable.fnGetData(nTr); var sOut = '' + '' + '' + '' + oData.gsx$name.$t + '' + '' + oData.gsx$year.$t + ' ,' + '' + oData.gsx$country.$t + '' + '' + oData.gsx$time.$t + '' + '' + oData.gsx$director.$t + '' + '' + oData.gsx$actors.$t + '' + '' + oData.gsx$description.$t + '' + 'לחצו לביקורת באתר' + '' + ''; return sOut; } }); /* end of ready */ [/code]
- 14th Oct 2013fnFakeRowspan - normal mode (without server-side processing)Hi, I am trying to use the fnFakeRowspan plugin but without the server-side processing feature of the DataTables. My scenario si the following: Manually trigger the ajax call to get the data [code] $.ajax({ "dataType": 'json', "type": "GET", "url": "../api/appointments", "data": "i=" + ids, "success": appDataReady }); [/code] When data is received, make some modifications, hook some event handlers depending on data [code] //column I wish to merge cells on // there are 2 hidden cells (index 0 and 1) hidden by the code below // I need to merge cells on the column index 2, which is is actually the first visible column (but the 3rd column in the data) var iColumn = 2; function appDataReady(data) { // client side processing/altering of the received json data like: if (data.aoColumnDefs[i].sName == 'time_limit') { data.aoColumnDefs[i].mRender = function (data, type, full) { ... some code here ... } } // hide some columns // this might raise some problems on drawCallback // since oSettings.aoData._aData[iColumn] and oSettings.aoData.nTr.childNodes[iColumn] are out of sync, correct? data.aoColumnDefs[i].bVisible = false; // initialize datatables var dt = $("#tblApp").dataTable(data); } [/code] After all data is ready, I need to merge some cells containing same text and I am trying to do it like this: [code] dt.fnFakeRowspan(iColumn, false); [/code] Nothing happens and I can see in the console that the "fakeRowspan" function never gets called even if the aoDrawCallback contains the entry. What would be the solution to my scneario? Thank you.