[Not exactly the same as the question how to disable knockout click.... My question involves specific usage of an HTML table and contains valuable approaches on solving such case.]
I have the following table and button below it:
<table>
<tbody data-bind=foreach: my-array>
<tr data-bind=click: $ShowDetails()>
...
<button>Add New Record</button>
The table rows are clickable (and would load some details data in another table).
On click of the button I need to disable all table rows and add one new <tr>
on top.
I know how to add the new record on top:
$('<tr><td contenteditable=true>New Record Here</td></tr>').prependTo('table > tbody');
But how to disable all rows of the table so they won't be clickable and look disabled (grayed out)?