Okay
  Public Ticket #1862332
Removal of Headers or reverse rows/cols
Closed

Comments

  •  2
    Alan started the conversation

    Is there any possiblity to display the table in reverse fashion for rows and cols, having the table columns up and down instead of across and the rows populate across for each of these columns.

    OR

    without too much JS or PHP, is there a way to remove ALL objects when displaying the table and just show a cell or cells, no headers, nothing, not even the object where it shows NEW EDIT DELETE as well as the area where you choose STANDARD or EXCEL views.  This is extreme and only even a thought if the above first option is not possible.

    I cannot find a way to eliminate the column headers, I leave the Display Header empty and it does as expected, leaves the original from MYSQL.  I do not even want the headers to display at all, just the cell.  Must be some way to hide them?

  •  2,572
    Aleksandar replied

    Hello Alan.

    As far as the first question is concerned - I am sorry to inform You that, unfortunately, this is not possible with the plugin's built in functions.

    You can hide the column headers by adding this custom code in Your Custom CSS field under main settings of wpDataTables:

    .wpdt-c thead {
    display: none !important;
    }
    

    Also, when You open the table in question and open the Table Tools tab, You can disable them, and it'll get rid of all the export buttons as well as the type of editor (see attachments).

    To hide New, Edit or Delete button you can add one of this CSS in Custom CSS field on
    wpDataTables settings page or directly on the page between<style>Your code</style> tags:

    .DTTT_button_new {
    display: none !important;
    }
    .DTTT_button_delete {
    display: none !important;
    }
    .DTTT_button_edit {
    display: none !important;
    }
    

    Please note that this only hides the buttons, it doesn't delete them from the table.

    You can, however make the table non-editable and then You wouldn't have these buttons at all.

    Please let me know if this helps.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Alan replied

    ok that's great, will work with the CSS.  the problem of the one option to make it uneditable, and this may lead to another answer if it exists, is that I leave it editable when I have to filter what data each person can see.  I work with the WorkerID we manage for each login so if I want to keep the filter to view their respective data records, I keep the filter on provided by the edit function.

    I assume the area that shows switch view is not able to hide via CSS?

    Switch View: STANDARD | EXCEL-LIKE

    Actually if I use that CSS to hide the columns, I need to find a way to limit that per table, this was a requirement for only one table type I have.  Sorry I should have mentioned that.

    Following up on that note, would it be possible in the near future to allow CSS or even JS customizations in the table editing area itself in addition to the main settings?


    This table is very odd I know, but there is a form plugin that has the two way with MYSQL, but I have to keep taking crash courses in PHP to do a lot of it.  Was hoping your table plug could adjust so it is ok to be thinking I am crazy, lol, just trying to "engineer" with existing tools.

  •  2,572
    Aleksandar replied

    Hello again Alan.

    That's alright, no worries. :-)

    To use the CSS just for one table, You need to remove it from Custom CSS in main settings of wpDataTables, and paste it between the <style>Your code</style> tags on the page where the table is located.

    For example:

    <style>
    .wpdt-c thead {
    display: none !important;
    }
    </style>

    Same goes for the "Switch view":

    <style>
    .wpdt-c .col-sm-12.p-0.wdt-edit-buttons {
        visibility: hidden !important;
    }
    </style>

    Almost everything can be hidden with CSS, You just have to look for the right code.

    We carefully follow customers requirements and try to implement most of them if they appear in requests from time to time, so we will add to our idea list and look into some possible solutions on plugin side in the future.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Alan replied

    Excellent, thanks!

    This prompts a question just for information, or perhaps suggestion.

    I see some tickets or FAQs always asking for a CSS solution.  I know CSS to a good degree, nothing near top notch, but I am slightly unsure of what to use in syntax and hate to keep opening up tickets.  Like I now want to force the column widths so I need <td style="width: 20%"> or something like that.

    The columns are way too wide and I'd like them to settle to a width just to fit content like MS Excel does.

    Is there a common syntax to use and we just drop the CSS we know into it on the style tags?

    Like this for example:

    table.wpDataTable tbody tr td{
    vertical-align:top !important;
    }

    Perhaps my lack of knowledge is what to call the objects or if this is a CLASS issue I am not sure of when operating with the plugin styles.  I appreciate the help and the FAQs, but they do not always drive me to a sure solution for the next CSS topic I need to solve.

    Thanks for any help, if not, totally ok, just wanted to ask.

  •  2
    Alan replied

    Update:  After looking into doing something else with JS, I suspect seeing this from DEV TOOLS, that this is where we capture the CSS syntax or work from? (cut down for brevity)


    <table id="table_1" class="display nowrap data-t data-t wpDataTable dataTable no-footer" style="" data-described-by="table_1_desc" data-wpdatatable_id="30" role="grid">



  •  2,572
    Aleksandar replied

    Hello again Alan.

    Just for future reference:

    When you have questions or issues which are not related to the title of the active ticket can you please open a new one, and we will help you there. In that way, issues and questions which are related to different subjects will be in different tickets so other customers or our support agents can find it easily. Our policy is to have one issue or question per ticket because of the reasons that is described already.

    Thank you for understanding.

    As for the custom CSS, we usually don't work with customization, since support for the plugin includes only helps with bugs and issues, but not writing custom code.

    These small questions like you have are an exception because they don't take that much time, and are easily fixable. I agree that some of these functionalities may be added in the plugin for easier customization, and some of them have been added to our To-Do list, so they may appear in one of our future updates. For now - custom CSS is the way to go.

    About the width - if you have the table Display settings set to Limit table width, you can resize the width of the columns by opening the settings for each individual column (see attachments).

    If, however, you have the Scrollable slider enabled, you need to use CSS.

    When you inspect the page, right-click on the column and inspect again, so you're not looking for:

    <table id="table_1" class="display nowrap data-t.....

    but instead:

    <th class="wdtheader sort  column-schedulingtag sorting" style="" tabindex="0" ...

    So, for example, for the width of column "Scheduling Tag" (column-schedulingtag when you inspect the page), you can add this custom code:

    .wpdt-c th.column-schedulingtag {
    width: 150px !important;
    }
    

    Now, this applies both on front and on back-end table, so if you need it just for front-end, you need to add it to the page, where you pasted the table's shortcode; like this:

    <style>
    .wpdt-c th.column-schedulingtag {
    width: 150px !important;
    }
    </style>
    [wpdatatable id=13]
    

    Now, these are just examples from my local environment, so you need to change the column name from "schedulingtag" to your column name (without spaces).

    If you want to add this to all columns, you can open column settings, and add a CSS Class, for example "narrow", so the code on the page should be:

    <style>
    .wpdt-c .narrow {
    width: 150px !important;
    }
    </style>
    [wpdatatable id=13]
    

    With this option, you can add custom css class to any column you like, and the custom width applies only to those columns.

    Please let me know if this works for you.

    Best regard

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Alan replied

    Please close this ticket, I am moving what I put here to a new ticket with a proper relevant title.

  •  2,572
    Aleksandar replied

    Sure thing, Alan.

    Closing this ticket.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables