Search
18959 results 691-700
Forum
- 16th Nov 2015how to create ajax's datatables using 2 table of mysql?Hi everyone, i need to do a table using data of 2 (or more) tables of my database (mysql) using ajax and php obv. for 1 table i'm using this code: <?php /* * DataTables example server-side processing script. * * Please note that this script is intentionally extremely simply to show how * server-side processing can be implemented, and probably shouldn't be used as * the basis for a large complex system. It is suitable for simple use cases as * for learning. * * See http://datatables.net/usage/server-side for full details on the server- * side processing requirements of DataTables. * * @license MIT - http://datatables.net/license_mit */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Easy set variables */ // DB table to use $table = 'table'; // Table's primary key $primaryKey = 'primarykey'; // Array of database columns which should be read and sent back to DataTables. // The `db` parameter represents the column name in the database, while the `dt` // parameter represents the DataTables column identifier. In this case simple // indexes $columns = array( array( 'db' => 'cod', 'dt' => 0 ), array( 'db' => 'description', 'dt' => 1 ), array( 'db' => 'date', 'dt' => 2, 'formatter' => function( $d, $row ) { return date( 'Y/m/d', strtotime($d)); } ) ); // SQL server connection information $sql_details = array( 'user' => 'root', 'pass' => '', 'db' => 'db', 'host' => '127.0.0.1' ); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * If you just want to use the basic configuration for DataTables with PHP * server-side, there is no need to edit below this line. */ require( 'ssp.class.php' ); echo json_encode( SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) ); anyone can help me? thanks so much!
- 9th Jul 2015Editor: Create and then Select New Rowhappen. New row is created via editor, after creation
- 24th Mar 2015how to create progress bar for showing exporting status of data table in excel at server side?Hi, I am going to show a progress bar while exporting data table to excel at server side.My exporting servlet works fine and export all the data.But now I want to show the progress of exporting on jsp using progress bar.plz help me to salve this problem. Thank you in Advance
- 26th Nov 2014Create dynamic html tableWith your angular datatable api, how it possible to generate a dynamic html table usin dynamic json array (number of column is undefined) ? thx,
- 24th Sep 2014Customising the format of the data send to the server on 'create' actionHello all, I am using datatables with the editor extension to post data to an ASP.NET MVC backend. The action I am calling expects a complex object which I would like it to be able to automatically find the property values for using default model binding. My problem is the default model binding expects the fields to have EXACTLY the same names as the public properties defined by my object. So when the table POSTs the data data as data[name]="name" it can't find the value for the property 'Name'. I can work around this problem by defining a custom model binder, but I have a lot of models I will be working with so would rather be able to reformat the data send by the table so that the default model binder can find it e.g. name="name". Can this be done? Thanks Nathan
- 22nd Sep 2014How can I create music playlist using multiple(x3) tables with drag, drop, sortable functionality?Hi All, A newbie to DataTables, but am keen to implement on its core functionalities as I think its really extensible. I'm trying to integrate a Music Playlist Creator using 3 tables into my Rails application. Table 1 - Songs, music, cuts Table 2 - Jingles, commercials Table 3 - Blank Playlist My aim is to drag and drop the contents from Tables 1 + 2 into the Blank Playlist table. I have been experimenting with jQuery UI but doesn't have the functionality I need. The closest example I can find is: http://codepen.io/esironal/pen/britv although this doesn't have all the bells and whistles like DataTables, e.g. sorting, search etc and only uses 2 tables. Would be great to hear if anyone has ideas or solutions to point me in the right direction. FYI, am using Bootstrap 3 if that makes any difference whatsoever to the responsiveness/styling. Look forward to hearing from anyone - Many thanks!
- 3rd Sep 2014Create childrow callbackHello, is there some sort of callback, when i add childrow to table using "columns":[ {"data": null, "class": 'details-control', "defaultContent": '' }, as in example here http://datatables.net/examples/api/row_details.html ?
- 21st Aug 2014How to create a checkboxes to filter - sample and minor bugHi everyone, After scouring on the net, I am able to use checkboxes for filtering. The only problem I have is that the filtering is set to OR and not an AND search. I suspect it has to do with afnFiltering.push. I am not a Javascript expert and I think the check for now is for any condition is meant to filter and display. Can someone help me change the coding such that afnFiltering check that the data meets all the checked criteria and not just one? http://jsfiddle.net/ckctam34/o9L99u8m/4/ Thanks! Cliff
- 4th Jun 2014PHP validation for a field only in create windows from and not in edit windows formI validate a field in the creation windows form for required field and so unique: Field::inst( 'barcode' ) ->validator( function($val, $data, $opts) { global $db; if ( empty($val) ) { return "Codice a Barre obbligatorio"; }else{ $checkdup = $db ->select( 'listino', 'id', array( 'barcode' => mysql_real_escape_string($val) )) ->count(); if($checkdup !== 0){ return "Codice a Barre esistente"; } } return true; } ), the problem that in edit windows form I should not validate the field, is possible? sorry for my english, I hope I explained
- 2nd Jun 2014Create Custom CellRegarding http://datatables.net/reference/option/columns.createdCell How do you multiple if statements, For example if Celldata > 1 and Celldata < 5 .. Is that possible Can this also be done with row functions?