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

How to insert an Image in the messageBottom for DataTables PDF export ?

$
0
0

Hi, I have been working with DataTables for a few months now. It has been a great experience as well. I have come a long way with DataTables and successfully implemented a lot of features. My question is, how would I show an Image in the Message Bottom or Message Top areas for the DataTables. I have converted the image to base64 and did all that was necessary in the same context. I could display the image in the header section of the exported document, but that is not what I want to do. The image should be displayed as a bottom message. Any help or input is greatly appreciated.

Thanks!


Getting sum show up under column

SearchPane - feedback

$
0
0

This thread is for feedback of the SearchPane blog post.

SearchPane is currently "experimental", in the sense that it hasn't been released as a full extension for DataTables and all that entails, as I would like to get some early feedback on the software. Is it useful? What is it missing? I'll maintain a list of requests in this post so we don't end up with too many duplicates.

Regards,
Allan

Feature list

  • Full support for Bootstrap, Foundation, Semantic UI, etc.
  • Server-side processing support (loading data from the server-side)
  • Have the count show two numbers - the first would be how many remain in the filtered set and the second would be how many in the table overall.
  • Ordering of data to match the DataTable
  • Search the search pane!
  • Rebuild API method for selected columns
  • Collapsible container
  • Support for array based data
  • Interfacing with the global search (difficult?)
  • Selection options similar to Select (e.g. os and multi, etc.)
  • Option to match column visibility (with or without Responsive?)

Home Page Search to Link to Filtered DataTable

$
0
0

Hi all,

I'd like to know how I can create an extra page that will search my datatable then return a separate page with the datatable already filtered with the correct results.

Long story short, I already put in all the work on my datatable, presented it, and was told that the initial page should be ONLY a search box. I just want to keep everything I already have and create a new page to keep the additional work to a minimum.

I'm using MVC C#.NET and client-side datatables jquery, not sure if any of that matters. Thanks in advance.

DatePicker not showing up in the front

$
0
0

Has anyone also had issues with DatePicker and Custom CSS. I can't get DatePicker to come up infront of all the other CSS I have. Just a general question but I can post my code if it helps.

Thanks!
-Abel

How to create this drop down month data?

$
0
0

Hi guys, I am making a website for a client and he wants a drop down of month data like the one that appears on this website:

Im using table press and worpress but i dont know if it's posible to add this feauture. I also need to change the colors of each row. So definitely he want the exactly same table as the web i show you.

Thanks in advance.

How to use if condition with datatables

$
0
0

I have datatable for index list view in asp.net core 3.1, I have a category where status would be either active or inactive, I want to implement condition if status is inactive only details button is visible but if status is active then details, edit or delete should be visible/

How do you initialize a Custom Scrollbar

$
0
0

I have scrollX set to true on my tables it works ok its just ugly and poorly positioned as there are vis. comm. elements that sit directly under the datatables. I need to customize the scrollbar and I favor the mac osx lion version of jQuery Scrollbar. I have tried to get it to work but my scrollbars stay the same... What is the proper way to initialize it to get results from a long horizontal table body? Can you post a real quick example of how to implement?


datatable ajax data

$
0
0

Hi.

I replaced function ajax with a datatable.


$(document).ready(function() {
    getUserList();
}

function getUserList(){
    $.ajax({
        url : "userList.json",
        success:function(data){
            var html = '';
            for(key in data){
                html += '<tr>';
                html += '<td>'+data[key].name+'<td>';
                html += '<td>'+data[key].email+'<td>';
                html += '<tr>';
            }
            $("#div").empty();
            $("#div").append(html)
        }
    })
}

I have succeeded in changing the source above as below.


$(document).ready( function () {
    var table = $( '#userTable' )
    .addClass( 'nowrap' )
    .dataTable( {
        responsive: true,
        ajax: {
            'url': 'userList.json’,
            'dataSrc': ''
        },
        columns: [
            {'data': 'name'}, 
            {'data': 'email'}
        ]
    } );
} );

But I don't know how to change the data in the source below...
Where should I add something to my data table?


var global_UserOrder = null;

$(document).ready(function() {
    global_UserOrder = order;
    getUserList();
}

function getUserList(order){
    global_UserOrder = order;
    $.ajax({
        //this
        data : { 
            order : order,
        },
        //
        url : "userList.json",
        success:function(data){
            var html = '';
            for(key in data){
                html += '<tr>';
                html += '<td>'+data[key].name+'<td>';
                html += '<td>'+data[key].email+'<td>';
                html += '<tr>';
            }
            $("#div").empty();
            $("#div").append(html)
        }
    })
}

Thanks. ^--------^

Tổng hợp những chất lượng của nhà cái GDWViet: và GDWBET link

$
0
0

Phân tích nhà cái GDWbet là ai?. Nhà cái GDWViet là một cái tên rất mới trong ngành nghề cá cược trực tuyến, casino online, thế nhưng ai đã chơi bắn cá trực tuyến thì ko lạ gì với độ uy tín và mạnh mẽ nhà cái này tại châu Á.
GDWbet là một nhà cái tại Thái Lan, được cấp phép bởi The Isle of Man. Nhà cái GDWbet khởi đầu hoạt động từ năm 2012. Đây là một nhà cái có web cá cược uy tín, là một trong số ít những nhà cáo được đa dạng tay chơi cá độ trên toàn thế giới để ý, tham dự kèo cược.
Tại Việt Nam, GDWViet cung ứng phổ biến trò chơi, dịch vụ kèo cược tiêu khiển như: cá cược bóng đá thể thao, xổ số, Slot Games, bắn cá hay casino trực tuyến. Nhà cái GDWbet casino cam kết mang lại cho người chơi những trải nghiệm thú vị, chất lượng cá cược đạt hạng 5 sao và là một trong những [url=https://nhacaionline.com/nha-cai-uy-tin/]nhà cái uy tín hiện nay[/url] hàng đầu Đông Nam Á cũng như toàn châu Á.
Giao diện của website nhà cái GDWbet – GDWviet[/b]
ko quá màu mè, rườm rà như các nhà cái khác, giao diện website của nhà cái GDWbet tương đối thuần tuý, chỉ có tông màu đen chủ đạo và một ít màu vàng, trắng.
Tuy trang chủ website GDWbet ko sản xuất phổ quát thông tin nhưng các banner PR của nhà cái này lại rất đẹp mắt và cuốn hút. Phông chữ tương đối lớn, rõ ràng, dễ nhìn với các anh em kèo cược. Dẫu vậy, nội dung trên website tương đối ngắn gọn, chỉ thuần tuý là sơ sài thông tin các sản phẩm.
Website khá tương xứng với điện thoại và máy tính, Do vậy nên các bạn chỉ cần một chiếc điện thoại smartphone có kết nối mạng hay chiếc máy tính là đã có thể truy tìm cập vào trang chủ nhà cái GDWbet để tham dự hệ thống kèo cược.
[img]https://lh6.googleusercontent.com/O1VsheRlXq3DAlzBmQ1T7vcpjoQ4GJmbBAZoCV2I63Lb-UL9xT6FR4Qk5Baw-3lp-HES2wRl4udcEaryzU85iueguq-5xZbP25M1dwPsdDueFTZ8x5npZhf2hC9t6RiNOfyRkg5s[/img]
Các sản phẩm dịch vụ của GDWbet[/b]
Nhà cái GDWbet cung cấp đa dạng sản phẩm dịch vụ phong phú và nhiều như: cá cược thể thao bóng đá, casino trực tuyến, bắn cá, các trò chơi slots. Trong đó, nhà cung cấp cá cược thể thao bóng đá có 2 hình thức để người chơi có thể tham gia là GDWsports phân phối cược châu Âu và Oneworks sản xuất kèo cược châu Á.
Ở hạng mục cá cược bóng đá, nhà cái GDWbet có các giải quán quân bóng đá hàng đầu toàn cầu như World Cup, Euro, UEFA Champions League, Europa League, ngoại hạng Anh, Bundesliga, Laliga, Serie A hay Ligue 1,… Các giải bóng đá địch châu Âu khác như Nga, người yêu Đào Nha, Hà Lan, Ba Lan,… cũng được đích danh nhà cái GDW bet chỉ tên.
Các giải bóng đá tới từ châu Á, châu Phi, Nam Mỹ, Bắc Mỹ hay châu Đại Dương,… như giải vô địch bóng đá Hàn Quốc ( K – League ) , giải vô địch quốc gia Nhật Bản ( J – League ), giải vô địch bóng đá Trung Quốc ( C – League ), giải vô địch đất nước Australia ( A – League ),… thậm chí giải vô địch đều được nhà cái gdwbet “điểm mặt chỉ tên”.
Chưa dừng lại ở đấy, các giải bóng đá nữ, giải hạng 2, hạng ba hay giải bóng đá trẻ như U19, U21, U16,… của Việt Nam cũng như trên toàn thế giới đều có trong hệ thống kèo cược của nhà cái GDWbet.
Ngoài bóng đá, nhà cái GDWbet còn có những môn thể thao khác để anh em dân cá độ có thể tham dự như: bóng bàn, bóng chuyền, cầu lông, quần vợt, đua thuyền, đua xe đạp, bóng rổ, cờ vua, đấu kiếm, võ thuật, bơi, điền kinh, đá cầu, thể dục phương tiện, đấu vật,… hay các môn thể thao điện tử khác.
Các chương trình khuyến mại, phần thưởng “khủng” trong khoảng nhà cái GDWbet[/b]
ko phải thua kém bất kỳ nhà cái nào, nhà cái GDWbet có [url=https://nhacai.info/khuyen-mai-ca-cuoc-gdwbet/]các khuyến mãi của nhà cái cá cược GDWbet[/url] độc đắc, những phần thưởng quá “khủng”. Cụ thể, có một vài chương trình khuyến mãi như: thưởng thành viên mới tham gia GDWbet 128 phần trăm, thưởng các vòng quay Freespins hoàn toàn miễn phí và thưởng hoàn trả lên tới 0,88 phần trăm. Không chỉ thế, có những chương trình khuyến mại “khủng” dành cho phần đông người chơi nên nam giới em kèo cược hoàn toàn có thể an tâm để tham gia.
Phương thức thanh toán của nhà cái GDWbet[/b]
Tại Việt Nam, nhà cái GDWbet chỉ tương trợ được với những người chơi nạp tiền trong khoảng 10000 đồng (nếu nạp ít hơn thì tài khoản sẽ không hiển thị số dư ). Ở thời điểm hiện tại, nhà cái chỉ tương trợ người chơi nhận tiền thắng cược cũng như nạp tiền phê duyệt hình thức chuyển khoản ngân hàng.
Những ngân hàng tiếp sau đây đã được nhà cái hỗ trợ chuyển khoản đấy là: nhà băng ACB, nhà băng Vietinbank, ngân hàng Techcombank, nhà băng Vietcombank và ngân hàng Sacombank.
Một điều đáng lưu ý, người chơi khi nạp tiền hay rút tiền đều ko phải mất bất cứ khoản phí nào thêm.
chăm nom và hỗ trợ khách hàng của nhà cái GDWbet[/b]
Với mục tiêu “khách hàng là thượng đế”, nhà cái cá cược uy tín nhất việt nam GDWbet luôn để ý, chăm lo khách hàng từ những khoản nhỏ nhất. Những uẩn khúc, uẩn khúc chưa hiểu người chơi có thể chọn lựa 1 số kênh giao thông như sau:
+ Chat trực tuyến trên Website.
+ Gọi điện trực tuyến, chat trên zalo với số điện thoại: 0167 2522 166
+ Gửi thư qua mail: cskh@gdwviet.com
+ Skype: 0167 2522 166
+ Viber: 0167 2522 166
Nhà cái GDWbet có nhân viên tương trợ là người Việt Nam nên phái mạnh em dân cá độ tại Việt Nam có thể yên tâm làm việc cộng GDWbet mà ko sợ bị rào cản tiếng nói.
Vấn đề bảo mật thông báo của nhà cái GDWbet[/b]
Ở thời điểm hiện tại, trang web chính thức của nhà cái GDWbet tại Việt Nam là www.gdwthai.com/vi vẫn chưa dùng hệ thống bảo mật an toàn SSL ( https://). Vì vậy, khi truy vấn cập vào trang chủ để đăng ký cũng như tham dự các hệ thống cá độ thì bạn hãy nên cẩn trọng đăng ký những vấn đề liên quan tới vốn đầu tư hay thông tin tư nhân.
Hi vọng trong thời gian đến, nhà cái GDW sẽ nâng cấp chế độ bảo mật lên một tầm cao mới để anh em dân cá độ nhận thấy an toàn hơn lúc tham gia vào hệ thống kèo cược của nhà cái này.
Đánh giá chung về nhà cái GDWbet[/b]
Nhà cái GDWbet có một vài ưu điểm nổi trội như có nhiều tiết mục khuyến mãi khá hấp dẫn, nhà sản xuất tương trợ quý khách nhanh chóng và thuận lợi, các trò chơi được sản xuất bởi những nhà cung cấp games uy tín.
Dẫu vậy, nhà cái gdwbet vẫn còn một vài điểm khắc phục như chưa dùng hệ thống bảo mật SSL để kiểm soát an ninh cho website của mình có thể dẫn đến những nguy cơ rủi ro, điều này khiến rộng rãi anh em dân cá độ “sợ hãi” lúc nạp tiền cũng như các thông tin cá nhân vào đây.
So với các nhà cái khác, số lượng trò chơi cũng như hệ thống kèo cược của nhà cái gdwbet tỏ ra “lép vế” hơn. Điều này ít phổ thông dẫn đến “ảnh hưởng xấu”, mất quý khách khi mà các nhà cái khác Wellbet hay ibet888,… hơi mạnh về các trò chơi casino trực tuyến, xổ số, bắn cá,…

Print option is working on "Chrome" for less records i.e (50-100) but not for large records.

$
0
0

Print option is working on "Chrome" for less records i.e (50-100) but not for large records (more than 100). Is there any issue with chrome or do I need to change anything in my code. Same code is working for IE and Firefox browser.

Add individual column filters to DataTables that use Pipeline

$
0
0

I want to add individual column filters to DataTables that use Pipeline, but I haven't found the right library, between individual column filters and pipelines only run one

Pagination - Display number of previous and next page

$
0
0

Hello,

When i use Datatables with large amount of data, i have many pages.
For example, i have 10 pages.
Initial state of pagination is : << 1 2 3 ... 10 >>

If i click 6 times on ">>" button, pagination become :
<< 1 .. 6 .. 10 >>

Is there a solution to display the previous and next page number ?
Like this : << 1 .. 5 6 7 .. 10 >>
And maybe with a settings, define how many number we want to display
For exemple, with a setting "4 numbers"

<< 1 .. 4 5 6 7 8 .. 10 >>

Thanks !

where condtition with arrays - serverside

$
0
0

Hi!

I've got the following code.

include(dirname(__FILE__)."/../Editor-PHP-1.9.2/lib/DataTables.php");

// Alias Editor classes so they are easy to use
use DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Validate,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\ValidateOptions;

$my_id=$_POST['my_id'];
$timepoolid=$_POST['timepool_id'];

//$yourQueryArray = join(',',$timepoolid);
// Build our Editor instance and process the data coming from _POST
$editor = Editor::inst($db, 'crapper_vulnerability', 'crapper_vulnerability.id')
//    ->order('ip')

    ->fields(

        Field::inst('crapper_vulnerability.outputtool'),
        Field::inst('crapper_vulnerability.testtypeid'),
        Field::inst( 'crapper_vulnerability.toolid' ),
        Field::inst( 'crapper_vulnerability.scanid' ),
        Field::inst( 'crapper_vulnerability.fp' )
            ->setFormatter( function ( $val, $data, $opts ) {
                return ! $val ? 0 : 1;
            } ),
        Field::inst( 'crapper_vulnerability.cvss_temp' ),
        Field::inst( 'crapper_vulnerability.cvss_env' ),
        Field::inst( 'crapper_vulnerability.cvss_base_new' ),
        Field::inst( 'crapper_vulnerability.not_in_report' )
            ->setFormatter( function ( $val, $data, $opts ) {
                return ! $val ? 0 : 1;
            } ),
        Field::inst( 'crapper_vulnerability.ip' ),
        Field::inst( 'crapper_vulnerability.mac' ),
        Field::inst( 'crapper_vulnerability.netbiosname' ),
        Field::inst( 'crapper_vulnerability.os' ),
        Field::inst( 'crapper_vulnerability.start' ),
        Field::inst( 'crapper_vulnerability.stop' ),
        Field::inst( 'crapper_vulnerability.plugin_id' ),
        Field::inst( 'crapper_vulnerability.plugin_name' ),
        Field::inst( 'crapper_vulnerability.port' ),
        Field::inst( 'crapper_vulnerability.protocol' ),
        Field::inst( 'crapper_vulnerability.cve' ),
        Field::inst( 'crapper_vulnerability.cvss_base_score' ),
        Field::inst( 'crapper_vulnerability.service_name' ),
        Field::inst( 'crapper_vulnerability.description' ),
        Field::inst( 'crapper_vulnerability.solution' ),
        Field::inst( 'crapper_vulnerability.kundenr' ),
        Field::inst( 'crapper_vulnerability.rapport' ),
        Field::inst( 'crapper_vulnerability.filename' ),
        Field::inst( 'crapper_vulnerability.tp_key' ),
        Field::inst( 'crapper_vulnerability.plugin_output' ),
        Field::inst( 'crapper_vulnerability.timepool' ),
        Field::inst( 'crapper_vulnerability.id' )

    )
    ->where('crapper_vulnerability.kundenr', $my_id)


    ->where( function ( $q ) use ( $timepoolid) {
        $q->where( 'crapper_vulnerability.timepool', '(SELECT crapper_vulnerability.timepool FROM crapper_vulnerability WHERE crapper_vulnerability.timepool LIKE :timepool)', 'IN', false);
        $q->bind( ':timepool', '%'.$_POST['timepool_id'].'%' );}
)

    ->process($_POST)
    ->debug(true)
    ->json();

I'm trying to use an array $timepool in a where condition, but I'm getting the following error:

Notice: Array to string conversion

How do I resolve this?

Kind regards,
Svendber

[Editor] Immediatly submit the form after a upload is made

$
0
0

I have a question regarding the Editor behaviour after a upload on the form is made. I wonder if you can help me with that.

I'm using the following code on the controller:

...
    
    ->join(
        Mjoin::inst( 'ficheiros' )
            ->link( 'ordens_nacional.ordem_nacional', 'ordens_files.id_ordem' )
            ->link( 'ficheiros.id', 'ordens_files.file_id' )
            ->fields(
                Field::inst( 'id' )
                    ->upload( Upload::inst( $_SERVER['DOCUMENT_ROOT'].'/ecra/uploads/editor/__ID__.__EXTN__' )
                        ->db( 'ficheiros', 'id', array(
                            'filename'    => Upload::DB_FILE_NAME,
                            'filesize'    => Upload::DB_FILE_SIZE,
                            'web_path'    => Upload::DB_WEB_PATH,
                            'system_path' => Upload::DB_SYSTEM_PATH,
                            'username' => $_GET['user']
                        ) )
                    )
            )
    )
...

I'm using the following code on the page:

...
 {
                label: "Documentos:",
                name: "ficheiros[].id",
                type: "uploadMany",
                display: function ( fileId, counter ) {
                    return '<a target="_blank" href="'+editor.file( 'ficheiros', fileId ).web_path+'">'+editor.file( 'ficheiros', fileId ).filename+'</a> <small>('+editor.file( 'ficheiros', fileId ).username+')</small>';
                },
                noFileText: 'Sem ficheiros'
            }
...

Do you think is it possible, after a upload is made, to submit or update the row immediately, without having to click on 'submit' or 'edit'?

Thank you in advance for your care.


Inline editing preSubmit event doesn't capture the correct row 'this'

$
0
0

I'm using inline editor of the grid. In the preSubmit event, as documentation shows, I'm trying to grab 'this' to evaluate the data for validation prior to committing it. I've noticed that 'this' doesn't return the correct row of data. It shows the currently focused row instead of the row that was just edited. So if you're on row 1 and make a change and then click on row 2 to lose focus, 'this' returns a reference to row 2. The params do show the correct reference to row 1.

Is there an easier way to get the data from the row that was just changed or a different event that should be used when inline editing?

Rowgroup

$
0
0

Does RowGroup work with Editor and how do get it to perform automatically resorting?

Reload and Show Data (Server Side Processing)

$
0
0

Hello @all,

I'm a completly new to AJAX / datatables (coming from c++),
so sorry for my question.

I use server-side-processing to get data from a database.
The table is shown sucessfully, but I want to reload the data source each 10 seconds to
and show the updated values:

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TestPage</title>
  </head>
  <body>
    <table id="memListTable" class="display" style="width:100%">
    <thead>
        <tr>
            <th>First name</th>
            <th>Last name</th>
            <th>Email</th>
            <th>Gender</th>
            <th>Country</th>
            <th>Created</th>
            <th>Status</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th>First name</th>
            <th>Last name</th>
            <th>Email</th>
            <th>Gender</th>
            <th>Country</th>
            <th>Created</th>
            <th>Status</th>
        </tr>
    </tfoot>
</table>
  </body>
</html>
<!-- DataTables CSS library -->
<link rel="stylesheet" type="text/css" href="datatables.min.css"/>

<!-- jQuery library -->
<script src="jquery/jquery-3.3.1.min.js"></script>

<!-- DataTables JS library -->
<script type="text/javascript" src="datatables.min.js"></script>

<script>

var table = $(document).ready(function(){
    $('#memListTable').DataTable({
        "processing": true,
        "serverSide": true,
        "responsive": true,
        "keys": true,
        "ajax": "getData.php",
        "dom": "Bfrtip",
        buttons: [
            'copyHtml5',
            'excelHtml5',
            'csvHtml5',
            'pdfHtml5'
        ]
    });
});

setInterval( function () {
  table.ajax.reload();
  }, 10000);


</script>

The timer-function works as expected, but the data is not actualized.
I also tried the draw()-function without success.

Can somebody help me?

Best regards

Moppi

footerCallback total is not calculating the right column

$
0
0

Hi,
I'm using footerCallback to add the total amount of selected product, every thing is working fine except getting the total here is my code:

`

                            footerCallback:  function (row, data, start, end, display) {
                                        var api = this.api(), data;
                                        // Remove the formatting to get integer data for summation

                                        var intVal = function (i) {
                                            return typeof i === 'string' ?
                                                i.replace(/[\$,]/g, '') * 1 :
                                                typeof i === 'number' ?
                                                    i : 0;
                                        };

                                        // Total over all pages
                                        totalsum = api.column(3)
                                            .data()
                                            .reduce(function (a, b) {
                                                return intVal(a) + intVal(b);
                                            }, 0);

                                        $(api.column(3).footer()).html(
                                            '(' + totalsum + ' SAR) '
                                        );
                                    },

`

the odd thing is that when I change the api.column(3) to api.column(2) - which is not the wonted column- it works fine!

scrollY with individual column searching (text inputs) in the header and set the value of the input

$
0
0

Hello,

After using scrollY I'm not able to put individual column searching (text inputs) in the header and can't set the value of the input with val(); also anymore. Test page:

http://live.datatables.net/yuvuhate/1/edit

For example line 167; I can't set the value of every matched element.

About the individual column searching (text inputs) in the header (related posts):
https://datatables.net/forums/discussion/30936
https://datatables.net/forums/discussion/35673
https://datatables.net/forums/discussion/comment/146190/#Comment_146190

I tried the trick of colin (without 100% working):

http://live.datatables.net/diwapewa/33/edit

Could I get help with this things?

Thanks,

Mark

Viewing all 81903 articles
Browse latest View live


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