Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question.
    Please try this “Custom Command”:

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 6 ] }, { "sType": "date-eu", "aTargets": [ 5 ] }, { "bVisible": false, "aTargets": [ 1, 2 ] } ], "aaSorting": [[5,'asc']]

    Basically, the aoColumnDefs need to be combined into one.

    Regards,
    Tobias

    Thread Starter poojith

    (@poojith)

    Wow now its worked correctly.
    Thanks Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem!
    You are very welcome.

    Regards,
    Tobias

    Is it possible to de-activate sorting for a single row?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    for a row? How should that look like? I’m confused.

    Regards,
    Tobias

    let me rephrase- is it possible for 1 rrtingow to stay static? as in, i click on header and every row is sorting exept for 1.im trying to make the 1st row look like a 2nd header.
    like in here https://www.kadunud.com/add-new-confirm

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, ok. Got it.

    Unfortunately, I’m not aware of an existing solution to this ?? Your best bet to achieve this might be to add the row with some custom JavaScript code, each time the table is sorted. For that, you’ll need to directly use the API of the external DataTables JavaScript library. This might be a starting point: https://datatables.net/release-datatables/examples/api/add_row.html

    Sorry that I don’t have a working solution here ??

    Regards,
    Tobias

    I figured it is possible if the row has different values-

    Is it possible to give row a value for sorting?

    I mean: if you look at this https://kadunud.com/uus-2/

    and click on column to sort, notice the row2 with green house icons- it only goes to TOP or very BOTTOM of the table.

    Is it possible to give the row (or items in it) TWO values (lowest and highest at the same time) so it would be up there, on top of the list at all times?

    and if you create a new table, how do you give it the look of the other table you made before? (since they don’t share Custom CSS @ plugin options).
    I created a new table but it looks completely off and it doesn’t have separate tablepress.min.css file aswell? :/

    Edit, ignore that post ^ haha.

    You can target table ID in custom CSS options, silly me sorry ??

    Damn, sorry for so many problems hah :S

    Another question:

    I added

    .tablepress-id-1 .column-2 {
    	width: 100px;
    }

    to custom CSS options, and they are applied (atleast in inspect element),
    but in reality they are not. The command just doesn’t work, I disabled tablepress add-on’s to see if they override the command but no luck :S

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no, sorry, giving a row (or a cell in a row) two values like this is not possible, or at least I can’t imagine how this would be possible. Sorry.

    About styling two tables in the same way: Yes, just copy the CSS code and adjust the table IDs ??

    Regards,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Deactivate sorting for a specific columns’ is closed to new replies.