is it possible to get data of title instead of data of td

is it possible to get data of title instead of data of td

naeemsaif0407naeemsaif0407 Posts: 8Questions: 3Answers: 0
edited March 2016 in Free community support

@allan help?

Answers

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Can you clearly state the issue and ideally link to a test case showing the problem and the configuration you are using please?

    However, why not use cell().node() and access the title attribute from the node?

    Allan

  • naeemsaif0407naeemsaif0407 Posts: 8Questions: 3Answers: 0

    I want to use Data that is present in the title tag instead of it's value, is it possible.. for example

    '<td title="$ ' + item.TotalPrice+ ' USD">$ ' + item.Price + ' USD</td>'

    Datatable will show item.Price as its the value of the <td>
    But i want it to show item.TotalPrice

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Perhaps I'm being thick, but if you want the TotalPrice to be shown in the TD cell, why wouldn't you just put TotalPrice in place of Price?

    Allan

  • naeemsaif0407naeemsaif0407 Posts: 8Questions: 3Answers: 0
    edited March 2016

    this was just an example.. Now let me explain you...
    I have long text in rows which exceeds the width of the cells , so i have abstracted the text width.... (i.e. this is an exam.....) and i have kept the complete text in the tooltip on hover.
    now I export the data into pdf , it copies (this is an examp.....) i want it to copy the complete text which is present in the title tag(used for tooltip) of the row.
    @allan

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    I would suggest you do the inverse and use the ellipsis renderer. That will also help with SEO (if that is important).

    Allan

  • naeemsaif0407naeemsaif0407 Posts: 8Questions: 3Answers: 0

    @allan thanks. Its a new thing for me and seems great! :)

This discussion has been closed.