Okay
  Public Ticket #2978064
Hide column row in table
Closed

Comments

  • Andrew Steven started the conversation

    I would like to know how to do I:

    - Hide one column row (between two columns) - See attached image
    - How to put icons from my theme in front of each name of the first column that is in bold
    - How can I control the height of cells (reducing the height space between them)
    - How to determine a fixed maximum number of width and height of the entire table.

    Please, I need your support.

    Leave the table in the link, like the table in the image below. (hidden line between columns and icons in front of the first column)


    8130222670.png

  •  1,851
    Miloš replied

    Hi, Andrew

    Thanks for reaching out to us

    1. Not sure if I understand correctly, regarding hiding one row between 2 columns; do you need something like this, to hide an entire row, as I highlighted a row on this image?

    6691709794.png

    - Basically, if it's not a "simple table", you could use Conditional Formatting to set a condition on a column, for example - if a cell in a row contains a certain string, or if it's empty ( there are various different conditions you could set), 

    if a condition is met, it can then set a custom CSS class for the entire row; and you can set "display:none" ; so that row will become hidden if that makes sense? Please tell me more details if that's not what you meant to achieve.

    - But seems to me that you are using a simple table, then it might be very tricky to achieve this... Please give us more details, what kind of use case do you need in regards of hiding a row? Maybe you could create a Manual Table instead, then we could use conditional formatting to achieve that.smile.png

    2.  Regarding images with text in a cell; you can  input HTML code in a cell, with an image tag, and text after it, and it should work. ( Or you can use HTML editor, too)

     You can place image with text in same cell, by using HTML edit functionality, here is an example; 

    4339835720.png

    If you use HTML editor, make sure to select this "Source code", and then you will type HTML there:

    4913294920.png

     Then, create an image HTML tag, with the proper path to the image/icon that you need; in my case, I just uploaded a simple image in the WP library and typed that path, and after the image tag, you can put any text you need.

    8197282367.png

    - When I refreshed it, it automatically wrapped everything in a paragraph tag, as you can see; but you can just use <img> tag, and type text after; experiment with HTML code as you need.smile.png

    ;

    3. For the height of the cell content, in Simple Tables, you can go to Display setting, and decrease this value for cell padding :

    9204960047.png

    and that will shrink the space between the rows/cells:

    1764138662.png

    - If you choose to switch to a Manual table, 

     you could use, for example "line height" CSS property;

    You can add this to your custom CSS of the table :

    .wpDataTablesWrapper table.wpDataTable > tbody > tr > td {   
     line-height: 5;
    }
    

    Try this out and let me know if that's what you needed. You can experiment with the value of line-height, (if using Manual tables) to create the spacing that you need between cells.

    ;

    4. For the maximum height and width of the table ; again it depends on the type of table.

    For simple tables, we could use this custom CSS, add this on the main plugin settings - Custom JS and CSS :

    table#wpdtSimpleTable-1 {  
      table-layout: fixed !important; 
       max-width: 500px !important;   
     max-height: 300px !important;
    }
    

    (change the table ID to your table ID)

    4253978251.png

    - Tell me if that helps, and please contact us if you need further details or more guidance.

    - And I apologise if this was too many details; I just like to cover as much as I can to try and explain all the functionality.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  • Andrew Steven replied

    Thanks for your detailed answer, it was clear and will help me with other details.

    But the initial doubt still persists. What I want is for the (separation) line between two columns to be hidden.


    I want the two columns to remain (the first bold and the second normal).

    I tried using CSS but no success with your table:

    table#neldrew {
       border-collapse: collapse;
       border: 1px solid #ddd;
        width: 40%;
      
    }

    th, td {
       border-bottom: 1px solid #ddd;
       padding: 8px;
       text-align: left;
    }

    tr:hover {background-color: yellow;}


    6205507518.png


    I want something that looks like this:


    7703597985.png


    Two columns, but without that "line" that separates them.


    8793882790.png


  •  1,851
    Miloš replied

    Hi, Andrew

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -1. Regarding the removal of that middle border, separating the columns, it took me some time to experiment with customization, but i found a workaround.

    Can you try adding this to your custom CSS on the main plugin settings > Custom CS and JS, please?

    .wpdt-c.wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable tr td:first-child, .wpdt-c.wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable thead tr td:first-child, .wpdt-c .wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable tr td:first-child, .wpdt-c .wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable thead tr td:first-child, .wpdt-c.wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable tr td:last-child, .wpdt-c.wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable thead tr td:last-child, .wpdt-c .wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable tr td:last-child, .wpdt-c .wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable thead tr td:last-child {  
      border: none
    }
    .wpdtSimpleTable.wpDataTable tbody td:last-child {  
      border-bottom: 1px black solid !important;  
      }
    .wpdt-c.wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable tr td:first-child {   
         border-right: none !important; 
       border-bottom: 1px solid black;
    }
    

    6773687590.png

    - Of course, you can try to experiment more with the styles, but at least we found some selectors that should help regarding the borders.

    -2.

    As for the hover, i am still working on it, sorry about the wait time; we always try to advise the best we can, and if the solution needs just basic CSS, that is not a problem;

    but technically, depending on the level of customization, we have some limits of how much custom work we can do that is included in our support.

    - So far, i got the cells to highlight on hover; but not the row yet. This CSS works for the cells:

    .wpdt-c.wpDataTableContainerSimpleTable .wpdtSimpleTable.wpDataTable tr td:hover {
        background-color: green;
    }
    
    2583295798.png

    - I will check with our developers what we can do about the row highlight on hover; and if they have advice on how to improve my "borders custom solution" as well.

    So, i will come back to you when i get more information. Hopefully, this is enough to get you started.

    Thank you for your patience once more.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  •  1,851
    Miloš replied

    Hello again, Andrew

    - I got word from the developers, and unfortunately, there is nothing further than this to advise from our end;

    the custom styles that we provided are the limit of what our support can cover.

    Of course, you can always try to search for a workaround custom example on places such as Stack Overflow;

    Our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in the near future.

    We can recommend reaching out to someone who does custom solutions, such as WP Kraken,
    but we can't advise on their pricing.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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