Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

spfx -DataTable HyperLinks

$
0
0

Hi ALl,

I am using Jquery Datatable to display items in web-part. 

I have 3 columns that I am rendering, One is Url. Is it possible to have URl Link clickable. 

https://datatables.net/reference/option/columns.render

      $('#example').DataTable( {  
                    data: jsonArray,  
                    columns: [  
                        { title: "Site Url"},  
                        { title: "UserName" },
                        {title:"Status"}
                       ]  
                } );  
$('#example').dataTable( {"columnDefs": [ {"targets": 0,"data": "download_link","render": function ( data, type, row, meta ) {
      return '<a href="'+data+'">Download</a>';
    }
  } ]
} );

The top is example am looking. 

Thanks


Abenet


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>