Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all 82542 articles
Browse latest View live

How to Resize column filter plugin controls for jquery datatable

$
0
0
how can i resize column filter plugin controls for jquery datatable. I used below code for column filter plugin but it didnt changed...
I hope some one can solve my problem...

$("table#tblOscarNominees").dataTable().columnFilter(
            {
                //sPlaceHolder: "foot:before",
                "aoColumns": [
                                null, //{ "type": "number-range" },
                                {"type": "text", width: "50px" },
                                { "type": "select" },
                                { "type": "text", width: "50px" },
                                {"type": "number-range", width: "50px" },
                                { "type": "select" },
                                { "type": "select" },
                                { "type": "date-range", width: "50px" },
                                ]
            });

for better understanding please see this image

[IMG]http://i46.tinypic.com/2naoc43.jpg[/IMG]

and for more details please check this link

http://www.reddyinfosoft.blogspot.in/2012/12/jquery-datatable-plugin-in-aspnet-using.html

DataTables not calling editor.on API functions for editor.create, editor.edit, editor.remove

$
0
0
Hi,

I can't figure out why the Editor API functions aren't being used for my form. I'm using editor.add to populate the form with all the fields, and that works fine. Please see this jsfiddle to check my code.

http://jsfiddle.net/m5ySp/1/

Thanks for any help!

-Carl

DataTables with childRows

Need code for Scroller Server side example

Site documentation update Request

$
0
0
On the following page: http://datatables.net/styling/themes/smoothness

there is text that reads"
All you need to do is enable the flag in the initialisation object.."

Can you define "the flag" on this page? or link "the flag" to the page with the definition.

Thanks. Amazing tool by the way! Thank you!

Multiple tr in a tbody

$
0
0
Hi, I have this table which gets its data from my sql database. I run a jquery function to enable users to view row details upon clicking on an icon. I have 2 <tr> inside my <tbody>. I had given my row details <tr> a class of its own so that the jquery function can call it out. Right now, Data tables isn't showing up.

This is my code:
<div id="wrapper">
<form name="myForm" onsubmit="return onSubmitform();" method="post" enctype="multipart/form-data">
<fieldset>

<table id= "table_id" class="display">

<thead>

<tr>
<th>Details</th>
<th>Id</th>
<th>Name</th>
<th>Address</th>
<th>Shipped</th>
</tr>
</thead>

  <tbody>
  <?php 
while ($row = mysqli_fetch_array($result)) {
?>
<tr>
    <td>
	<img src="details_open.png" name="detailsButton" class="detailsButton">
	</td>
    <td> 
	<input type="submit" class="formbutton" onclick="document.pressed=this.value" name='pdf[<?=$row['id']?>]' value="">
	<input type="text" value='<?=$row['id']?>' name="id" id="order_id" style="border:none">
	</td>
	<td width="20%"><?=$row['name']?></td>
	<td width="30%"><?=$row['address']?></td>
	<td class="shipped" width="10%">
	<input type="checkbox" name='shipped[<?=$row['id']?>]' value="S">
	</td>
	</tr>
	
	<tr class="detailsRow">
	<td colspan="5"><table class="bordered" id="inner_table" cellpadding="10" cellspacing="0" border="1"><thead><tr><th>Item Id</th><th>Item Description</th><th>Quantity</th><th>Price</th></tr></thead><tbody><tr><td>1</td><td><?=$row['product']?></td><td><?=$row['quantity']?></td><td><?=$row['price']?></td></tbody></table></td>
	</tr>
<?php
}
?>
</tbody>
</table>
</fieldset>

<fieldset>
<table>
<tr>
<td><input type="submit" onclick="document.pressed=this.value" value="Update"> </td>
</tr>
</table>
</fieldset>
</form>
</div>

Thanks!

good work

$
0
0
Hi,
I am using Data Tables in my project and I must say "Damn good stuff, Sir" . However the "export as XLS" stuff does not work as expected. It converts the table into ".csv" file. Would be great if actual .xls file is created instead of .csv

Apply StyleSheet(or Class) to <td> provided in JSON as AjaxSource


how can i do edit only column in editable table

Number search between a min max value

$
0
0
I have a real estate database and the min-max prize of the estate is in the same column. I us ColumnFilter. How can I do that, if i write a number in the prize search field, it search it for me between min and the max value.
Example: prize column contains: 150 - 200 in one row, I write in the search field: 165. Normaly it shows me nothing, because it not match any of the numbers.

Thanks, for your help!

Server-side populated datatable with ajax filtering features

$
0
0
Hi,

i am using datatable for the first time and i must say it is great.

I was populating a datatable via ajax call with a small amount of data and it is very easy to make searches against it, just because the filter is being applied to all columns simultaneously.

Now i want to have the same filter options in a table, for which the data is being generated server-side. I have a table in my db with 30.000 rows. I tried it with an ajax call. It took about 5 seconds till the table generating process completed fully, and for my employer, this is a no-go.
I tried to populate the table with fnAddData and multiple ajax calls at the same time, which returned smaller pieces of the whole data. That made as expected no difference in speed.

I looked at the example on http://www.datatables.net/release-datatables/examples/server_side/server_side.html
But the filter option there is very poor as mentioned there.

Filtering
* NOTE this does not match the built-in DataTables filtering which does it
* word by word on any field. It's possible to do here, but concerned about efficiency
* on very large tables, and MySQL's regex functionality is very limited


For example i cant search for gecko and firefox at the same time. My question is how to adress this problem with Mysql and Apache Webserver.

(Sorry for my poor english)

Thank you

FORCE TO OPEN EDIT FORM

$
0
0
Hello Allan,
I want to open the edit form when I click in the row. It´s posible to force this?

Thanks!

Ritch text areas in Editor

$
0
0
Hi all

I know Allan mentioned the possibility of a plugin to transform textareas into Ritch Text areas in the Editor.
Anybody went further with this?

I have tried most RTE's about but I am missing the how to's to integrate in Editor
In my application of DataTables and Editor, this type of RTE editor is vital as I edit and format emails to be sent to recipients stored in my table.
I would greatly appreciate any input on this.
...any input but a textbox :0)

Records Not Appearing In Order in DataTables

$
0
0
Hi,

I'm using AJAX to send data to DataTables, without server side processing.

My logs show that the JSON leaving the server is in order, but the order gets scrambled by the time it is displayed in DataTables.

This is the case both with IE 8 and FF 16.01.

Does DataTables by default sort on a particular column and if so is there a way to turn that off?

Here is my table code:

<script type="text/javascript">
    //Staff VECI for 540733
    $(document).ready(function() {
        $('#540733_staff_veci_table').dataTable( {
            "bPaginate": false,
            "sScrollY": "250px",
            "bScrollCollapse": true,
            "bFilter": false,
            "bServerSide": false,
            "sServerMethod": "POST",
            "sAjaxSource": "/nsd/staffvecitable",
            "aoColumns": aoColumns,
            "bProcessing": true,
            "bDeferRender": true,
            "fnServerParams": function ( aoData ) { aoData.push( { "name": "person_id", "value": "540733" } );}                     
        } );
    } );
    </script>

Here are the first 3 rows/records in my JSON string, in alphabetical order by last name, first name, middle name:

 {
  "aaData" : [ {
    "person_id" : "3304",
    "fullname" : "Campbell, Billy J",
    "email_address" : "billy.j.campbell@acme.com",
    "emergency_email_address" : "buffet@margaritaville.com",
    "emergency_cell" : "",
    "emergency_sms" : ""
  }, {
    "person_id" : "61885",
    "fullname" : "Gao, Paul",
    "noaa_email_address" : "someotherstupid.email@noaa.gov",
    "emergency_email_address" : "",
    "emergency_cell" : "",
    "emergency_sms" : ""
  }, {
    "person_id" : "661935",
    "fullname" : "Test0009, Jan0009",
    "noaa_email_address" : "",
    "emergency_email_address" : "",
    "emergency_cell" : "",
    "emergency_sms" : ""
  }, {

However in Datatables the first 3 names are

Cambell
Vargas
Gao

not alphabetical order or reversed alphabetical order.

Any ideas on what I can look at it as the source of the problem?

Thanks much in advance

Steve

"Show Entries" drop-down and edit buttons

$
0
0
Hello,

I want to show in my table, the edit buttons (edit, new and delete) and also i want de drop-down "Show Entries", but I can´t.
If I put "sDom": "Tfrtip", only shows the edit buttons. What can I do??

Thanks !!

datatables sort and search isn't working, i know why but no how to resolve this

$
0
0
Hello,
I have one table which works fine but the seconde one is a bit particular. My first table contains one object by row but my second table contains one object and this object is displayed in many rows (i give to datatable a json using django). Doing this, having only one object but many rows, sorting and searching doesn't work. Do you have any idea of how i can run this properly? I can at least sorting my first column with dictsort in my template but it's not sufficient by far. =/

SEARCH IN AJAX WITH QUERY SUM().

$
0
0
Hello friends, I have a problem.

I'm using a query with sum in my select, with datatables ajax.

But, when I search any work in datatable, return for me this error : Error Number: 1111

Invalid use of group function

Why I cannot do a query with sum in datatables with ajax ?

Thanks in advanced !!!!!

SAME RESULT IN FOOTER WITH 2 DATATABLES AJAX IN ONE PAGE

$
0
0
Hello Guys, I have 2 datatables with ajax in one page, and repeat for me the sInfo.

What I need do for dont repeat the sInfo ?

Thanks !

Ignited Datatables // php library

$
0
0
Hello guys,

Some of you guys might heard about Ignited Datatables. A wrapper class/library for Codeigniter.
( codeigniter version :https://github.com/IgnitedDatatables/Ignited-Datatables)

Here is the standalone php version of the library that has no dependency on Codeigniter. Usage is very similar.
(You can choose db driver: mysql and mysqli is supported at the moment. im planning on adding more)
https://github.com/n1crack/IgnitedDatatables-native-php-version

FEATURES:
1. Easy to use. Generates json using only a few lines of code.
2. Support for table joins (left, right, outer, inner, left outer, right outer).
3. Able to define custom columns, and filters.
4. Editable custom variables with callback function support.
5. Supports generation of tables using non utf-8 charsets.
6. mDataprop support!
7. Auto detects HTTP method (POST or GET) //only native php version

Available function list :
https://github.com/IgnitedDatatables/Ignited-Datatables/wiki/Function-Reference

This library makes server-side scripting easier and more flexible!

You can download the db (sakila) for examples from: http://dev.mysql.com/doc/index-other.html

Regards,
Yusuf

Force pagination reset?

$
0
0
At pobox.com, we use DataTables to display listings of spam we caught for people's accounts. We segment that spam in different ways on different pages, but, from the customer's perspective, each of those pages should behave the same way. After numerous complaints at the outset about changes "getting lost" (in actuality, made on one page, but not another), we forced all the tables in the section to use the same cookie for settings.

For the most part, everything works swimmingly. BUT. There's one big catch. Switching pages retains your pagination information, which can result in people seeing "no matching records found", even when they exist.

For example, let's say you're viewing entries 41-50 on page 5, and search. You are taken to a new table with only 5 entries. The View menu will say "Page 5 of 1", and the table content will say "no matching records found". But, if you click the button to return to the first page of results (or page back to Page 1), you will see the correct information.

So, is there a way for me to handle this? Ideas we came up with:
* force a pagination reset when changing pages
* store just the pagination information in a separate cookie
* (insert other possible solution here)

Thanks for any assistance you can provide!
Viewing all 82542 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>