Search
43891 results 7051-7060
Forum
- 12th Nov 2012How to make first column is fixed for data table, and how to disable search & sort features in DT?To disable pagination, no of pages selection etc. use And bPaginate / bLengthChange . It sounds like FixedColumns is what you want. You say it didn't work for you, but in what way? Without an explanation (and a link) of what is no working we can't offer any help! Allan
- 8th Nov 2012insert dojo button inside a table cellfnRender is string based (as well is being deprecated). You want to use fnCreatedCell to manipulate the cells and possibly mRender or sDefaultContent to put something into the cell in the first place. Allan
- 26th Oct 2012Weird count bug under my tableAha clearly not. That's an excellently formatted page. Thanks allan!
- 23rd Oct 2012Set Content Type to JSON causes open a download dialog display rather than populate into Data TableThe content type for your JSON looks a little off to me. The fact that the browser doesn't know what to do with it also suggests that it is wrong. Try application/json . Another question is when first load the page, it make two requests to server. Why is the error? No idea - I think we'd need a link to debug why that is. Allan
- 17th Oct 2012Convert Date Format from MySQL Table [SOLVED][SOVLED] Hi, I was actually able to figure it on my own. In the server_processing.php file, I added this to the output statement: [code] /* * Output / $output = array( "sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array() ); while ( $aRow = mysql_fetch_array( $rResult ) ) { $row = array(); for ( $i=0 ; $i<count($aColumns) ; $i++ ) { if ( $aColumns[$i] == "version" ){ / Special output formatting for 'version' column / $row[] = ($aRow[ $aColumns[$i] ]=="0") ? '-' : $aRow[ $aColumns[$i] ]; } elseif ($aColumns[$i] == "signUp_date") { $signUp_date = strtotime($aRow["signUp_date"]); if ($aRow["signUp_date"] == "0000-00-00 00:00:00"){ $row[] = "N/A"; } $row[] = date('m-d-y h:i:s a', $signUp_date); } elseif ( $aColumns[$i] != ' ' ){ / General output */ $row[] = $aRow[ $aColumns[$i] ]; } } [/code] The IMPORTANT part being: [code] elseif ($aColumns[$i] == "signUp_date") { $signUp_date = strtotime($aRow["signUp_date"]); if ($aRow["signUp_date"] == "0000-00-00 00:00:00"){ $row[] = "N/A"; } $row[] = date('m-d-y h:i:s a', $signUp_date); } [/code] The section with "N/A" does a check to see if there empty date in the column and then puts out that statement... anyone who doesn't have that can just take it out Thanks,
- 24th Sep 2012DataTables Table Tools - Deleting a row after inserting itYes exactly - just put a for loop over that deleting anSelected[i]. The API in 1.10 will be must more flexible in that regard allowing you to pass in an array of nodes to be deleted. Allan
- 20th Sep 2012Annoying horizontal scrollbar when using bScrollInfinite and table bordersRemove border-collapse: collapse and it will work fine ( http://live.datatables.net/eliwej/edit#javascript,html ). Border collapse makes really odd things happen with column width calculations. See this post from me for how to get the border collapse effect without actually using collapse: http://datatables.net/forums/discussion/9349/whitespace-between-table-and-vertical-scrollbar-in-ie6-and-ie7/p1#Item_7 Allan
- 14th Sep 2012Submit form data to server and then populate data table based on server response.This is the working code and this is how I have implemented it. Hope this helps. Yes here as well its name value pair. Probably you can serialize ! just a thought [code] oTable = $("#Remittance").dataTable( { "sDom": "<'row'<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6 'p>>", "sPaginationType": "bootstrap", "bSort": false, "bInfo": true, "bProcessing": false, "bAutoWidth": true, "bServerSide": true, "bRetrieve": true, "bDeferRender": true, // Make the first 'id' column invisible for the end user "aoColumns": [ { "bVisible": false }, null,null, null, null, null, null, null, // Script location "sAjaxSource": "../includes/getRemittance.php", "sServerMethod": "POST", "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { aoData.push( { "name": "remitStatus", "value": remitStatus } ); oSettings.jqXHR = $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, "success": function (data) { $('#Remittance').removeClass('hide invisible'); $('#processing').removeClass('alert alert-info').addClass('hide invisible'); fnCallback(data); }, statusCode: { 200: function(data) { if (data['iTotalDisplayRecords'] == 0 ) { $('#processing').removeClass('alert alert-info').addClass('hide invisible'); } } } } ); } }); [/code]
- 10th Sep 2012Getting current table settingsThe fnPagingInfo plug-in ( http://datatables.net/plug-ins/api#fnPagingInfo ) is the way to do it for paging. There isn't currently an equivalent plug-in for filtering, but the data store object in DataTables is the oSearch parameter with this model: http://datatables.net/docs/DataTables/1.9.3/DataTable.models.oSearch.html - if anyone fancies creating a similar plug-in :-) Allan
- 22nd Aug 2012Error handling for serverside processing data table:-) @Allan I am new to Ajax.... but your posts and datatables.net are much helpful to do all those analysis...