wor012
Forum Replies Created
-
11) Seems not working – i’am trying this
"columnDefs": [ { "searchable": false, "orderable": false, "targets": 0 }, { "order": [ [ 2, "asc" ] ] }, { className: "col-right", "targets": [2,3,4] }, { "render": $.fn.dataTable.render.number( ' ', ',', 1 ), "targets":[5] } , { "render": $.fn.dataTable.render.number( ' ', ',', 0 ), "targets":[3,4] } , { "targets":[3,4,5], "createdCell": function(nTd,data,oData,iRow,iCol) { if (data<0) { $(nTd).css('color','red'); } if (data>0) { $(nTd).css('color','green'); } } } ]
But it’s activated the first (tech) column
Hi.
10) Thanks, works11) Can you suggest, how to do – when refreshing the page – the table is always ordered by some (often – first) column – but now – by default – all columns have 2 arrows – up and down.
But i need only up arrow – ex. column is ordered – 1,2,3,4,…max
How to implement it?In order to – user must undarstand straight – the table is ordered by the first column.
- This reply was modified 4 years ago by wor012.
6, 9) Ok
10.1) Is any way to set global padding for column width for all tables?
10.2) Also is any way to set width in pixels or padding in the “Custom Commands” instead of global css?- This reply was modified 4 years ago by wor012.
Thanks!
7,8) Works!6) Hm. Works, but it’s not elegant, i think, because in order to set seachbox to correct place – i must change the default calculated table width.
As a suggest – it would be better not to change the witdh, but create setting – ex. SearchBoxPlace = {RightOfThePage, RightOfTheTable, Left…}
Now i disabled this searchbox – it’s better not to show him in that case of small table i think.9) How can i change the row height?
10) How can i change column width (maybe in percent of autowidth)?
(maybe you wrote it somewhere in forum, but i ask again (hope it’s last question))Hi.
6.1) This code works not so correct – because he place the whole table at center of the page, but i need from the left.
6.2) And i dont want to set width of the table – autowidth is good for me (with option – allow horizont scroll). And also, as i write above – i don’t want to set some settings in global css, because i have about 200 tables on site. For me better to set all at tables page settings. Is any way to set it there?7) https://h312432.r01host.ru/test1
8) Thanks. It works, but it’s about 7 lines of code at every table – its bad for me.
Because of reason – (6.2) Is any way to set it for all tables once (by one group of commnds)?6)
Did you use CSS code?
No, it’s standart settings – use gorizontal scroll bar – and if the table is small (not many columns) it fills not the whole page size.
And i don’t understand – what i must try?you could try applying that command to the .dataTables_wrapper CSS selector.
7) Thanks. Works! Only 1 question – why there is arrow buttons in the first “fixed” column? See screen https://snipboard.io/iIa0y7.jpg
8) I try to change row height – use padding (find in forum):
.tablepress thead th {padding: 6px 10px 10px 10px !important;} .tablepress tbody td {padding: 6px !important;}
But appeared some strange row in header – see screen above – how to remove it?
9) How to remove gray grid line between rows?
Hi. Thanks for help!
6).dataTables_wrapper .tablepress { width: 100% !important; }
It’s not working. it expand table to the whole page width
And i don’t need iti need: table must stay where it’s now (see screen above), but the search box must will appeared where the table is. E.g. not table must go right, but search box must go left.
7) Can you help with one feature – sometimes i need in technical column from the left of the table – “number of order” it must always be from the 1 to TableCount – always – no matter of current order column
How to implement it?Thanks. It works
"columnDefs": [ { "render": $.fn.dataTable.render.number( ' ', ',', 1 ), "targets":[4] } , { "render": $.fn.dataTable.render.number( ' ', ',', 0 ), "targets":[2,3] } , { "targets":[2,3,4], "createdCell": function(nTd,data,oData,iRow,iCol) { if (data<0) { $(nTd).css('color','red'); } if (data>0) { $(nTd).css('color','green'); } } } ]
Dot must be the delimeter. With dot “.” all works, e.g. (data>0)
5.1) It’s possible to set code (1) not in CSS section of the hole plugin but ex. in “Custom Command” section?
Becuase there is about 200+ tables on site and it will be uncomfortably to edit this long css code section.
Also sugest: Maybe you can implement it somewhere in interface in future?
ex. in “table content” section “order type of column”.5.2) Also if now 5.1 it’s impossible – sugest:
disable auto formatting in “Users CSS” code section – beacuse for me it would be better to view like this (in one string)
.tablepress-id-2 .column-3,.tablepress-id-2 .column-4,.tablepress-id-2 .column-5 {text-align: right;}
but not like this (in 5 string only for one table.tablepress-id-2 .column-3, .tablepress-id-2 .column-4, .tablepress-id-2 .column-5 { text-align: right; }
And set more width of this edit box. because it’s a lot of space on my screen from left and right of the edit box.
5.3) Also sugest: in “Table content” section write somewhere the numbers of columns, not only letters.
E.x. A (1) B (2) C (3) D (4)6) Why “Search box” appeared not good. See screen
https://snipboard.io/pzJ4x2.jpg
Horizontal scrool is on. And table view is ok, but why search box is not ordered by the right edge of table? How to fix it?Thanks!!
test it. work properly only 1 part.(have 1 additional question about it, but ask later, when we solving 2 and 3)i test on this sample table (you can import it)
№ Column 1 Column 2 Column 3 Column 4
1 Line 1 2118823054 83858 1111104,0
2 sfdgfgdfg -9911646 -86600 -113,0
3 Third 2876591 28748 98,5
4 Great name big 77281 468 179,8
5 Befo last 2924816 29743 101,5
6 Last one 9504700 207560 45,82.1) When i apply this script to sample table ST (listned above) the last column loosing fractional part of number. ex. “179,8” is shown like “179”
2.2) Maybe somewhere in your plugin is any setting – which symbol is delimeter betwen integer and fractional parts – “.” or “,”?3.1) Try to apply 3 to ST – also have problem whith last column – it’s not applaing the script, because of 2.2 problem, how to fix it?
4.1) How to combine script 2 and 3 at one script?
4.2) How to conbine this lines:
"columnDefs": [ { "targets": [ 2, 3, 4 ], "createdCell": function( nTd, data, oData, iRow, iCol) { if ( data < 0 ) { $(nTd).css('color', 'red'); } } } ]
and
"columnDefs": [ { "targets": [ 2, 3, 4 ], "createdCell": function( nTd, data, oData, iRow, iCol) { if ( data > 0 ) { $(nTd).css('color', 'green'); } } } ]
Resolved
Нашел какой-то плагин сторонний, который вместо истинного урл пишет набор цифр
Вроде норм.
Пока буду его использовать