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

jump to a specific row by value (string) when first instantiating the table

$
0
0

Is there a way to initialize a scrollable table and scroll to a specific row based on the string value of one of the fields in that row so that when the table is first displayed, the row with that value is showing at the top of the visible window?


Dynamic number of columns not displaying properly

$
0
0

You can see from the image below that my rows are showing the first column data repeated for each column with data. I would like to have the first column, Writers and Authors, shown once with the other columns stacked behind it. I have about 110 rows, each with a different number of columns.
Please understand that I am not a coder and am manipulating what was built for me. No budget to hire a coder, so any help is greatly appreciated. The code on the site is below.

Snip of JSON

{
    "data":[
  ["11-1011","Chief Executives",44.0401,"Public Administration." ],
  ["11-1011","Chief Executives",52.0101,"Business/Commerce, General." ],
  ["11-1011","Chief Executives",52.0201,"Business Administration and Management, General." ],
  ["11-1011","Chief Executives",52.0206,"Non-Profit/Public/Organizational Management." ],
  ["11-1011","Chief Executives",52.0701,"Entrepreneurship/Entrepreneurial Studies." ],
  ["11-1011","Chief Executives",52.0704,"Social Entrepreneurship." ],
  ["11-1011","Chief Executives",52.0801,"Finance, General." ],
  ["11-1011","Chief Executives",52.1101,"International Business/Trade/Commerce." ],
  ["11-1011","Chief Executives",52.1301,"Management Science." ],
  ["11-1021","General and Operations Managers",1.8202,"Veterinary Office Management/Administration." ],
  ["11-1021","General and Operations Managers",31.0301,"Parks, Recreation, and Leisure Facilities Management, General." ],
  ["11-1021","General and Operations Managers",31.0399,"Parks, Recreation, and Leisure Facilities Management, Other." ],
  ["11-1021","General and Operations Managers",44.0401,"Public Administration." ],
  ["11-1021","General and Operations Managers",52.0101,"Business/Commerce, General." ],
  ["11-1021","General and Operations Managers",52.0201,"Business Administration and Management, General." ],
  ["11-1021","General and Operations Managers",52.0206,"Non-Profit/Public/Organizational Management." ],
  ["11-1021","General and Operations Managers",52.0212,"Retail Management." ],
  ["11-1021","General and Operations Managers",52.0215,"Risk Management." ],
  ["11-1021","General and Operations Managers",52.0701,"Entrepreneurship/Entrepreneurial Studies." ],
  ["11-1021","General and Operations Managers",52.0704,"Social Entrepreneurship." ],
  ["11-1021","General and Operations Managers",52.0801,"Finance, General." ],
  ["11-1021","General and Operations Managers",52.081,"Financial Risk Management." ],
  ["11-1021","General and Operations Managers",52.1101,"International Business/Trade/Commerce." ],
  ["11-1021","General and Operations Managers",52.1301,"Management Science." ],
  ["11-1031","Legislators",44.0401,"Public Administration." ],
  ["11-1031","Legislators",44.0501,"Public Policy Analysis, General." ],

Javascript

<link href="/careerconnections/css/DataTables/datatables.css" type="text/css" rel="stylesheet">
<link href="/careerconnections/css/DataTables/datatables.additions.css" type="text/css" rel="stylesheet">
        <link href="/careerconnections/css/DataTables/Responsive-2.0.2/css/responsive.dataTables.css" type="text/css" rel="stylesheet">
        <link href="/careerconnections/css/DataTables/DataTables-1.10.11/css/jquery.dataTables.css" type="text/css" rel="stylesheet">
                
        <script type="text/javascript" src="/careerconnections/js/DataTables/DataTables-1.10.11/js/jquery.dataTables.js"></script>
        <script type="text/javascript" src="/careerconnections/js/DataTables/Responsive-2.0.2/js/dataTables.responsive.js"></script>




    <script>
        $(document).ready(function() {

            jQuery.extend( jQuery.fn.dataTableExt.oSort, {
                "my-currency-pre": function(a) {
                    return parseFloat(a.replace(/[ $,]/gi, ''));
                },
                "my-currency-asc": function(a,b) {
                    return ((a < b) ? -1 : ((a > b) ? 1 : 0));
                },
                "my-currency-desc": function(a,b) {
                    return ((a < b) ? 1 : ((a > b) ? -1 : 0));
                }
            });


                $('#example').DataTable( {
                    "ajax": '/careerconnections/data/DataTables/soc_cip_crosswalk_2020.txt',
                    "order": [[ 1, "desc" ]],
                    "lengthMenu": [ 25, 50, 75, 100 ],
                    /* Only needed when my-currency definition should be used on columns targeted by 0-indexed list of "aTargets"
                                        "aoColumnDefs": [
                      {"sType": "my-currency", "aTargets": [3,4,5]}
                    ]
                                        */
                } );
        } );
    </script>

Column definitions

<p>&nbsp;</p>
<table id="example" class="display responsive" width="100%" cellspacing="0">
<thead>
<tr><th>2018 SOC Code</th><th>2018 SOC Title</th><th>2020 CIP Code</th><th>2020 CIP Title</th></tr>
</thead>
<tfoot>
<tr><th>2018 SOC Code</th><th>2018 SOC Title</th><th>2020 CIP Code</th><th>2020 CIP Title</th></tr>
</tfoot>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>

Buttons Collection dropup with bootstrap is positioned incorrectly

$
0
0

Link to test case:
https://jsfiddle.net/jybleau/ftw4dgx5/

Error and description of the problem:
When using bootstrap 3 CSS, a collection button with dropup = true does not dropup correctly. It still drops down minus 5px instead of up.

I tried to debug in datatables.buttons.js :

The problematic code seems to be at line 1145 var collectionHeight = display.outerHeight();, the display outerHeight is zéro.
By changing the code to var collectionHeight = display.children().outerHeight(); we get the correct dropmenu outerHeight.

Might also have to change the code at line 1061.

PS: the problem could also be that the display object (the collection) shoud have the height of it's children, the dropmenu, already. But I could not find why yet...

NB: I did not test with other Bootstrap versions.
And the dropup is correctly dropping up (!) when using Datatables default CSS as seen here:
https://datatables.net/extensions/buttons/examples/styling/dropup

Thanks

columns.orderData

$
0
0

I recently used this sorting feature and it is a very useful function indeed. However, the only way to reference another column is by its index number such as orderData: [0]. Instead of using the column index number, is there a way to use the actual column name like orderData: ["Column1"] for readability reasons?

Select multiple rows by specific data for each row after initialized

$
0
0

It's possibile to select multiple rows after init by specific data of each row?

Select form control loses it's options after submit

$
0
0

Link to test case: Currently on my local PC, but I can make it available on a web server if necessary.
Debugger code (debug.datatables.net): I can't run that:

Access to XMLHttpRequest at 'https://api.datatables.net/versions/feed' from origin 'http://cpdtraining' has been blocked by CORS policy: Request header field x-csrf-token is not allowed by Access-Control-Allow-Headers in preflight response.

Error messages shown: None
Description of problem: I have a editor from which has a Select2 dropdown. It initialises perfectly, but can only be used once to add or update a record. After that, it no longer has any options. This happens whether it is a "select" or a "select2" type of field.

The select2 has opt tags set to true, but not doing that makes no difference.

This is my script:

(function (window, $) {
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': 'FmVEOOeSJMSizrGUMFkX1ivZeDtZDX8BO7YVpBnh'
        }
    });
    window.LaravelDataTables = window.LaravelDataTables || {};
    var editor = window.LaravelDataTables["indexTable-editor"] = new $.fn.dataTable.Editor({
        "instance": "editor",
        "idSrc": "id",
        "fields": [{
            "name": "development_area",
            "label": "Development Area",
            "type": "select2",
            "options": {
                "Use of derivatives": "Use of derivatives",
                "Reporting fundamentals": "Reporting fundamentals",
                //  more options
                "The financial strategy": "The financial strategy"
            },
            "className": "wrap",
            "title": "Development Area",
            "opts": {
                "tags": true
            }
        }, {
            "name": "motivation",
            "label": "Motivation",
            "type": "tinymce"
        }, {
            "name": "completed",
            "label": "Completed",
            "type": "radio",
            "options": {
                "&nbsp;No": 0,
                "Yes": 1
            },
            "unselectedValue": 0,
            "className": "text-center",
            "createdCell": function (td, cellData, rowData, row, col) {
                $(td).css('text-align', 'center');
                if (cellData < 1) {
                    $(td).css('color', 'red');
                    $(td).html('<li class=material-icons>report</li>');
                } else {
                    $(td).css('color', 'green');
                    $(td).html('<li class=material-icons>check_box</li>');
                }
            }
        }, {
            "name": "annual_plan_id",
            "label": "Annual Plan Id",
            "type": "hidden",
            "visible": false,
            "title": "Annual Plan",
            "data": "annual_plan.year"
        }, {
            "name": "id",
            "label": "Id",
            "type": "hidden"
        }],
        "formOptions": {
            "main": {
                "buttons": true,
                "focus": 0,
                "message": true,
                "onBackground": "blur",
                "onBlur": "close",
                "onComplete": "close",
                "onEsc": "close",
                "onFieldError": "focus",
                "onReturn": "submit",
                "submit": "all",
                "title": "Submit",
                "drawType": false,
                "scope": "row"
            }
        },
        "i18n": {
            "create": {
                "button": "New",
                "title": "New",
                "submit": "Create"
            },
            "edit": {
                "button": "Edit",
                "title": "Edit",
                "submit": "Update"
            },
            "remove": {
                "button": "Delete",
                "title": "Delete",
                "submit": "Delete",
                "confirm": {
                    "_": "Are you sure you wish to delete 0 rows?",
                    "1": "Are you sure you wish to delete this row?"
                },
                "multi": {
                    "title": "Multiple values",
                    "info": "The selected items contain different values for this input. To edit and set all items for this input to the same value, click or tap here, otherwise they will retain their individual values.",
                    "restore": "Undo changes",
                    "noMulti": "This input can be edited individually, but not part of a group."
                }
            }
        },
        "display": "envelope",
        "table": "#indexTable",
        "ajax": "http:\/\/cpdtraining\/development-area\/85cefe13-6b85-40a1-bf35-f5e24ba2473f"
    });

    // Edit record
    $('#indexTable').on('click', 'button.editor_edit', function (e) {
        e.preventDefault();
        console.log('Editing');
        editor.edit($(this).closest('tr'), {
            title: 'Edit record',
            buttons: 'Update'
        });
    });

    // Delete a record
    $('#indexTable').on('click', 'button.editor_remove', function (e) {
        e.preventDefault();
        console.log('Deleting');
        editor.remove($(this).closest('tr'), {
            title: 'Delete record',
            message: 'Are you sure you wish to remove this record?',
            buttons: 'Delete'
        });
    });
    
    window.LaravelDataTables["indexTable"] = $("#indexTable").DataTable({
        "serverSide": true,
        "processing": true,
        "ajax": {
            "url": "http:\/\/cpdtraining\/development-area\/85cefe13-6b85-40a1-bf35-f5e24ba2473f",
            "type": "GET",
            "data": function (data) {
                for (var i = 0, len = data.columns.length; i < len; i++) {
                    if (!data.columns[i].search.value) delete data.columns[i].search;
                    if (data.columns[i].searchable === true) delete data.columns[i].searchable;
                    if (data.columns[i].orderable === true) delete data.columns[i].orderable;
                    if (data.columns[i].data === data.columns[i].name) delete data.columns[i].name;
                }
                delete data.search.regex;
            }
        },
        "columns": [{
            "data": "id",
            "name": "id",
            "title": "Id",
            "orderable": false,
            "searchable": false,
            "visible": false
        }, {
            "data": "development_area",
            "name": "development_area",
            "title": "Development Area",
            "orderable": true,
            "searchable": true,
            "type": "select2",
            "visible": true,
            "width": "30%",
            "className": "wrap",
            "opts": {
                "tags": true
            }
        }, {
            "data": "motivation",
            "name": "motivation",
            "title": "Motivation",
            "orderable": true,
            "searchable": true,
            "type": "tinymce",
            "visible": true,
            "width": "30%"
        }, {
            "data": "completed",
            "name": "completed",
            "title": "Completed",
            "orderable": true,
            "searchable": true,
            "type": "radio",
            "visible": true,
            "unselectedValue": 0,
            "className": "text-center",
            "createdCell": function (td, cellData, rowData, row, col) {
                $(td).css('text-align', 'center');
                if (cellData < 1) {
                    $(td).css('color', 'red');
                    $(td).html('<li class=material-icons>report</li>');
                } else {
                    $(td).css('color', 'green');
                    $(td).html('<li class=material-icons>check_box</li>');
                }
            }
        }, {
            "data": "annual_plan.year",
            "name": "annual_plan_id",
            "title": "Annual Plan",
            "orderable": true,
            "searchable": true,
            "type": "hidden",
            "visible": false
        }, {
            "data": "id",
            "name": "action",
            "title": "Action",
            "orderable": false,
            "searchable": false,
            "className": "text-center",
            "render": function (data, type, full, meta) {
                return "<button class='btn-sm btn-primary editor_edit' type='button' style='width:116px;'>Edit</button>&nbsp;<button class='btn-sm btn-danger editor_remove' type='button' style='width:116px;'>Delete</button>&nbsp;<a href='/learning-activity/" + data + "'><button class='btn-sm btn-primary' type='button'>Activities <li class='material-icons' style='font-size:0.8em;'>arrow_forward</li></button></a>";
            }
        }],
        "responsive": true,
        "dom": "Bfrtip",
        "select": {
            "style": "os"
        },
        "order": [
            [1, "desc"]
        ],
        "buttons": [{
            "extend": "create",
            "editor": editor,
            "className": "btn-success"
        }]
    });
})(window, jQuery);

I'm using a DataTables plugin for my ASP.NET MVC program. The table displays without any CSS. Why?

Investigate data in Success Callback, what about Errors?

$
0
0

The instructions say that you cannot overwrite the success callback in the .ajax() option.... However, it says you can use either dataSrc: function(json) {...} to intercept and manipulate the returned json, or this function: "ajax": function (data, callback, settings) {...}

What about error messages returned from the server, or HTTP errors while trying to access the server? Like, if the response type is anything but 200? OR, if the SQL server returns an "access denied" message in an XML format instead of JSON? OR, the JSON is not properly formatted?

Example, my Server might return XML with an access denied message, so then I want to stop DT from loading, then display that message?

Basically, I think I'm asking: Where and how do I handle errors with AJAX when I'm specifying the .ajax() or dataSrc Options?

        ajax: {
            url: 'https://mySuperSecretAPI',
            type: 'POST',
            contentType: "application/json; charset=utf-8", //Use this content type when sending data to the server, json instead of form-data
            data: JSON.stringify(jsonRequest), //Data to be sent to the server, stringified, the actual payload
            dataType: "json",  //The type of data that you're expecting back from the server.
            dataSrc: function (json) {
                // try {
                //     JSON.parse(json.data);
                // } catch (e) {
                //     return '{"msg": "access denied do not render table"}'
                // }
                return json.data;
            }
        },

error after executing Page.ClientScript.RegisterStartupScript

$
0
0

Description of problem:

in ASp.NET APP , everything is OK except I receive the error "Cannot read property 'mData' of undefined" in the console just I execute the command Page.ClientScript.RegisterStartupScript

many thank
Ahmed Ibrahim

Autofill does not work if the query where condition is triggered

$
0
0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I have editor 1.9.4, datatables 1.10.21, the latest keyTable, AutoFill according the debugger both are enable and work fine for the most part.

The issue I'm having is when a user selects "YES" from a drop down option for a column named "Completed" and then tries to drag this down several column rows to perfom the Autofill, it doesn't execute. It's related to my query from the "Tableserver.php" in which I have a where clause that searches for records where "Completed" != "YES". If I disabled that line of for the query, then the AutoFill works just fine.

Is there a way to have the AutoFill still fill in multiple column rows on a filter query?

オリジナル プリントタオル

$
0
0

中国で最もプロフェッショナルなオリジナル プリントタオルメーカーおよびサプライヤーの1つとして、高品質の製品とカスタムサービスを提供しています。 ここで私たちの工場から中国製オリジナル プリントタオルを購入して安心してください。
Website:http://www.busymantowels.net

プリントタオル ふわふわ

$
0
0

中国で最もプロフェッショナルなプリントタオル ふわふわメーカーおよびサプライヤーの1つとして、高品質の製品とカスタムサービスを提供しています。 ここで私たちの工場から中国製プリントタオル ふわふわを購入して安心してください。
Website:http://www.busymantowels.net

プリントタオル 高級

$
0
0

中国で最もプロフェッショナルなプリントタオル 高級メーカーおよびサプライヤーの1つとして、高品質の製品とカスタムサービスを提供しています。 ここで私たちの工場から中国製プリントタオル 高級を購入して安心してください。
Website:http://www.busymantowels.net

Export Excel Data - Worksheets by date.

$
0
0

First I want to said thank you to all the staff, very clean and knowledgeable Site.

I want to ask if is possible to export excel report with multiple worksheets, base on dates?

for example:
if I filter my search by month, I want to export excel file, but I need worksheets by dates.

Thank You in advance.

deleted uploaded files still uploads

$
0
0

Hello,

We have setup dataTables and Editor and appear to be working fine as in populating tables, making edits and uploading files. It has been setup to allow multi-files upload and this is working fine as well.

However, when a file or files are selected to be uploaded, then we click the X button to cancel the file upload, or in other wards, decided we no longer wish to upload the file we just selected, so we click the X, the file is gone from the upload screen, however when clicking the update button, the file/files are still getting upload or recorded into the database.

Would this be a bug or am I missing some configuration?

Part of the editor initialization below:
{
label: "Documentation:",
name: fileField,
type: "uploadMany",
display: function (file_id) {
var file = editor.file('files', file_id);
var fileName = file.fileName.substring(file.fileName.lastIndexOf('\') + 1);
return '<a href="' + file.web_path + '" download="' + fileName + '">' + fileName +'</a>';},

Version of Editor is: 1.9.0

Version of dataTable below:

src="https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js"
src="https://cdn.datatables.net/select/1.3.0/js/dataTables.select.min.js"
src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.colVis.min.js"
src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.html5.min.js"
src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.print.min.js"
src="~/js/libs/dataTables.checkboxes.min.js"
src="~/js/libs/dataTables.editor.min.js"

Thanks


Запись N58 про Как Играть В Игровые Автоматы И Выиграть Реальные Деньги?

$
0
0

Федеральный закон от 29 декабря 2006 года № 244-ФЗ «О государственном регулировании деятельности по организации и проведению азартных игр и о внесении изменений в некоторые законодательные акты» определяет правовые основы государственного регулирования деятельности по организации и проведению азартных игр на территории СНГ, и устанавливает ограничения на осуществление данной деятельности в целях защиты нравственности, прав и законных интересов граждан.

  1. Спортивные симуляторы - жанр однопользовательский или многопользовательский игр, в которых на первый план выносится соревновательная составляющая игры с воспроизведением реальности механики движений гоночных машин, болидов, спортсменов (футболисты, хоккеисты, баскетболисты, бойцы UFC, волейболисты и др.) и качественной детализации графических игровых структур, локаций, внешности реальных спортсменов в рамках определенной компьютерной игры (Fifa, Need for speed, Formula 1, UFC, Basketball, NHLHockey, Forza Motorsport). Работа интернет-казино может быть нарушена в результате действий крэкеров (DDoS-атака).

Есть вариант в игровые автоматы играть без регистрации на своем компьютере в оффлайне при помощи установленных программ, однако это менее интересно - все равно как установить дома казино только для себя. Одни теории изучают азартное поведение на макроуровне, на уровне социальной структуры, другие - на индивидуальном, на микроуровне, который может включать описание индивидуальных характеристик проблемных игроков, мотивации различных игроков и т.
Трансгрессия (от лат. transgressio - переход, передвижение) -одно из основных понятий философии постмодернизма, определяющей трансформацию индивидуального и массового сознания людей, начиная с конца 60-х годов прошлого века. Двадцать шесть человек заявили нам, что они находятся на грани развода. Главное, чтобы большее количество людей узнало об Интернет казино и захотело там сыграть.
<a href='http://www.profi-forex.org/novosti-dnja/entry1008318172.html'>Вулкан удачи</a>
Законодательная инициатива предлагает штрафовать от 100 до 200 необлагаемых минимумов за принятие ставок от лица, не достигшего 18 лет. Только от вас и вашей удачи зависит успешный резульат, ведь каждая игра проверяется международной системой надежно защищающей от накрутки и какого либо мошенничества. В гражданском браке в настоящий момент состоят 13 человек (включая троих из числа состоявших в разводе).
Так же рекомендуем посетить страницу, где для Вас подобраны самые редкие аппараты вулкана. Если пользоваться услугами новых ресурсов, нет гарантий, что им доступны крупные суммы для выплат. Return to Player или отдача практически никогда не указывается разработчиком, но это можно уточнить в службе поддержки виртуального казино.

making column visible - column shown without header

$
0
0

Hi

Great Project, wonder if someone could tell me if the following is a problem with my implementation or a datatable issue. Have read a few forum posts with regards the colvis and responsive extension and am a bit confused if they can be used in the way shown here.

Debug: https://debug.datatables.net/izacar

Problem: when making a column visible - new table column data is shown without a header when width should dictate only a responsive (+) row be used

Example of this problem is available here:

https://ovits.com.au/dt_prob/dt_prob_orders.php

Using Bootstrap4

Have 10 Columns in Editor
Display 8 by default, if space available (two set with visible:false)

Issue occurs on desktop and mobile browsers

On Desktop - Windows 10 with Firefox 79 (with enough width for all 8 columns), when adding a 9th Column to table (colvis button):

  1. If enough space available for new visible column it works as expected added column with header https://ovits.com.au/dt_prob/when_enough_space.png

  2. If (screen space / window) is smaller than what is needed: a responsive row (+) is added to row but also a data column without a header https://ovits.com.au/dt_prob/problem.png

A page refresh resolves the visual problem when stateSave: true - complete is shown in the (+) only https://ovits.com.au/dt_prob/refresh_no_problem.png

Mobile (Apple - Safari - Portrait)

Three columns shown by default - Click Visibility -> Complete https://ovits.com.au/dt_prob/ios_dt_prob.png

Steps to recreate on desktop:

Open page
Resize width of page so Acknowledge disappears inside a (+)
Resize width of page slightly to reshow Acknowledge
Select Visibility -> Complete OR "Show All"
Complete column will appear on right without header as well as in a (+) row
Refresh page
Table should only show Complete column in responsive (+) row only

Steps to recreate on mobile:

Open page
Select Visibility -> Complete OR "Show All"
Complete Column will appear on right without header as well as in a (+) row
Refresh page
Table should only show Complete column in responsive (+) row only

Thanks in advance for any advice / help

Pete

Child row's width equals parent row's width

How to add rows to Excel export or why are my Child Rows not exported?

$
0
0

I have a need to export Child Rows to Excel. I want them to be inserted below their parent row in Excel. Basically looking the same as the Child rows show in Datatables. Not sure this is the most efficient way but this solution fits my needs:
http://live.datatables.net/jeduxela/16/edit

I used the excelHtml5 customize function to insert the rows. Basically the function gets the sheetData which is all the rows that Datatables will export. It iterates through the rows inserting the additional child row(s) as it goes. The data to be inserted is part of the original Datatables row data.

This table:

Ends up as this spreadsheet:

Not much formatting, etc in the spreadsheet. More information about formatting can be found in the customize docs.

If anyone has a better way to do this please post an example or suggestions on how to improve.

Kevin

Uncaught TypeError: nTd is undefined

$
0
0

Can't add test link because needs DB.
My problem with error nTd when I add anything else to first <tbody>.

_<tbody>
                    {% for e in entry %}
                        {% if 'Центральний р-н' in e[10] %}
                          <tr>
                            {% for elem in e[:10] %}
                                <td>{{elem}}</td>
                            {% endfor %}
                          </tr>
                        {% endif %}
                    {% endfor %}
                </tbody>_
That working okey, but if i Add anything in top or bottom i have a error nTd
_<tbody>
                    <tr>
                      <td class="colorfull" colspan=10>СТ "Авангард"</td>
                    </tr>
                    {% for e in entry %}
                        {% if 'Центральний р-н' in e[10] %}
                          <tr>
                            {% for elem in e[:10] %}
                                <td>{{elem}}</td>
                            {% endfor %}
                          </tr>
                        {% endif %}
                    {% endfor %}
                </tbody>_

<thead> look like this:

_<thead>
                     <tr style="font-weight:bold">
                         <th  rowspan="2">№ вул</th>
                         <th  rowspan="2">Тип</th>
                         <th  rowspan="2">Назва українською</th>
                         <th  rowspan="2">Назва росiйською</th>
                         <th colspan="3">Документ про присвоєння чи зміну найменування</th>
                         <th  rowspan="2">Мiсцерозташування на територiї</th>
                         <th  rowspan="2">Попередня назва чи написання</th>
                         <th  rowspan="2">Примiтка</th>
                      </tr>
                     <tr style="font-weight:bold">
                         <th>Дата</th>
                         <th>Номер</th>
                         <th>Видавник</th>
                      </tr>_

And if i add like this all work fine:

_<tbody>
                    <tr>
                         <td>№ вул</td>
                         <td>Тип</td>
                         <td>Назва українською</td>
                         <td>Назва росiйською</td>
                         <td>Дата</td>
                         <td>Номер</td>
                         <td>Видавник</td>
                         <td>Мiсцерозташування на територiї</td>
                         <td>Попередня назва чи написання</td>
                         <td>Примiтка</td>
                    </tr>
                    {% for e in entry %}
                        {% if 'Центральний р-н' in e[10] %}
                          <tr>
                            {% for elem in e[:10] %}
                                <td>{{elem}}</td>
                            {% endfor %}
                          </tr>
                        {% endif %}
                    {% endfor %}
                </tbody>_

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Viewing all 82216 articles
Browse latest View live


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