Okay
  Public Ticket #3496146
Hello WPDataTables Support Team
Closed

Comments

  • Engin started the conversation


    I hope this message finds you well. I have a couple of questions regarding WPDataTables:

    1. How can we shorten the text in a column in WPDataTables?
    2. When we open a master-detail popup, how can we ensure that the full text is displayed?

    Your assistance on these matters would be greatly appreciated.

    Thank you!

  •  1,708
    Miloš replied


    Hi Engin,

    I am sorry but i did not fully understand the first question,

    about shortening the text in a Column.

    Could you please elaborate a bit more, if you could provide any example as a screenshot how is the current column looking,

    and maybe compared to what is the desired goal?

    -

    If you just want to shorten the width of a Column, and have it set the three dots (...)  

    for example, if you have some long text, and then just like :

    Lorem ipsum 123 some long text...

    And the cell has more text but you just wish to cut it off in a column like that;

    In that case, you can try using Custom column Width and just keep the "Word Wrap" option disabled in Display Table Settings.


    You can make custom widths for columns in two ways.

    In the Table Settings - Display > enable 'Limit table width' option.

    5334909062.png

    This will allow you to set a custom width on any column.

    Enter the column settings / Column width > and set a number for pixels, or a percentage value.

    2335056691.png

    Here is an example on my table > i shorten the width for this column :

    2821422582.png

    6540694775.png

    2. Alternatively, you can also add custom CSS classes to multiple columns,

    then you can manipulate this class through our plugins settings/Custom JS and CSS/Custom CSS, ( if you wish to set same style for all tables that have this class);

    and also, each table has its own Customize/Custom CSS,

    for example, if i add custom Class named "customWidth", i can call CSS like :

    .customWidth {
    width : 200px !important;
    }
    

    Let us know if i misunderstood the goal.



    2. When we open a master-detail popup, how can we ensure that the full text is displayed?

    - If you mean to have the same solution related,

    like for example, to have the text 'shortened/ cut off'  in the standard Table View,

    but then to somehow extend the text to show in Full when you load the MD Pop-Up for the same cell?

    I am honestly not sure if that is currently possible,   we can check  by some testing,

    but if you can just confirm if i understood your goal?


    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [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

  • Engin replied

    Dear [Support Team],

    Thank you for your response. However, the solution provided regarding custom column widths doesn't address the specific requirement I have.

    To reiterate, I need to truncate text in a column to 150 characters, and if it exceeds this limit, append three dots (...) to the end.

    Could you please provide guidance on achieving this functionality within wpDataTables?

    Thank you for your assistance.

  •  1,708
    Miloš replied

    Hi Engin,

    Thank you for the clarification, i can understand what the goal is now.

    At this time, we don't have any built-in solution to achieve this, but you can suggest it to our developers - they will do their best to make a solution in the future.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    If you have coding skills and wish to try to make a custom solution now,

    you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.

    Please be advised that custom solutions with hooks are not included in our support.

    You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.

    ( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)

    Kind Regards, 

    Miloš Jovanović
    [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

  • Engin replied

    Hi Milos,

    Thank you for your answer, I solved it by creating a view with a sql select query and creating a new field.

  •  1,708
    Miloš replied


    Hi Engin,

    Apologies for being so late today on all your tickets.

    I am delighted to hear that this has been resolved. Thank you for letting us know. 

    Anything else that we could assist with, please don't hesitate to create new tickets.


    Kind Regards, 

    Miloš Jovanović
    [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