Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Aralize,

    I see that you added a custom columnDefs option to your publication. That options overwrites the default columnDefs added by the plugin. The plugin default columnDefs contains a className for each column specifically which allow you add your own CSS. My advice would be to remove your columnDefs, use the default and overwrite the CSS per column as needed.

    You can still center your text with just one selected like:

    #BDD2 th, #BDD2 td {
    	text-align: center;
    }

    And you can remove the column wrapping for column Titre like:

    #BDD2 th.Titre, #BDD2 td.Titre {
    	white-space: nowrap;
    }

    Please let me know if this helps,
    Peter

    Thread Starter aralize

    (@aralize)

    Hi Peter,

    Perfect, it works! Thank you so much !

    I replaced “#BDD2” with “table.wpda-datatable” so that the property applies for all tables (which will be similar).

    Good day.

    Thread Starter aralize

    (@aralize)

    Hi again,

    However, by removing “ColumnDef” I can no longer prohibit sorting on the first column.

    I have tried adding the following CSS code to hide the images from the cursors:
    table.wpda-datatable th.IMG.sorting_asc {
    background-image:none;
    }

    table.wpda-datatable th.IMG.sorting_desc {
    background-image:none;
    }
    But the images appear again if I click on another column to sort …

    Thanks.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Aralize,

    Please use the following option to completely remove ordering:
    { "ordering": false }

    Best regards,
    Peter

    Thread Starter aralize

    (@aralize)

    Hi Peter,

    I need to remove the sorting only on the first column, not on the other columns.
    This function will remove the sorting on all the columns.

    Thanks.
    Best regards.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Aralize,

    Sorry, I thought you wanted to disble ordering on all columns. You can use the columns option to disable ordering on specific columns like this:
    { "columns": [{"targets":0,"orderable":false},{"targets":1,"orderable":true}] }

    I think you have to enable/disable ordering for each column specifically, so you might have to add some more elements to your columns array.

    Best regards,
    Peter

    Thread Starter aralize

    (@aralize)

    Hi Peter,

    With these options it works, I put “orderable: true” for each column individually.

    Thanks a lot for your help !

    Best regards,
    Aralize.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Width column auto’ is closed to new replies.