Download for the Customized Column

Download for the Customized Column

srimansri6srimansri6 Posts: 4Questions: 2Answers: 0
edited July 2017 in Free community support

Hi,

While Binding the datatable data, i am using this customization for one of the column data.

(...........
{
                            "data": "customername",
                            "render": function(data,type, row, meta) 
                            {
                                return ("<div class=\"dropdown\">   <a id=\"dLabel\" data-target=\"#\" href=\"#\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\">  <span data-bind=\"text: CustomerName\">" + row.customername + "</span> <span class=\"caret\"></span>        </a>  <ul class=\"dropdown-menu\" aria-labelledby=\"dLabel\"> <li><a target=\"_blank\" data-bind=\"attr: { href: Link}\" href=\"https://console.developers.google.com/m/cloudstorage/b/archive/o/"+row.name + "\">View</a></li>     <!-- ko if: Processed() == 1 -->  <li><a href=\"#\" onclick=\"replaceFile('"+ row.name +"');\">Replace</a></li>     <!--  /ko --> </ul>     </div>" );
                            }
                        },
................)

This is working fine, but my problem is, when i download using "$(".buttons-csv").click();" event, i am getting this "View" and "Replace" text appended.

Any quick way to correct this?

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    Have a look at this example. Since you are using columns.render as a function, you'll need to modify what is being returned when the export is performed.

    Allan

  • srimansri6srimansri6 Posts: 4Questions: 2Answers: 0

    Thanks... That is working perfectly... As always.. you keep rocking :smile:

This discussion has been closed.