Now i have a bootgrid table to download files using bootgrid.I have written a formatter for that and it works well.
"commands": function(column, row) {
return '<a href="'+row["slink"]+'"><button type="button" class="btn btn-info " data-row-id="' + row.id + '">Download</buttn></a> ';
}
Where slink gives the download location of file for corresponding row with row id id..
Now the problem is that some rows dont have any files and row[slink] will return blank.When user clicks a blank row the page just refresh.
Now what i want to do is to disable the download button when the slink value is blank.How can i achieve this? It would be greatif i could change the button text from download to something like Not available it would be great.