I just created mvc 4 application. Here the view of a table of that project.
I want to disable clickable function currently active button
For example:
disable click function of first row Active button , enable click function for Inactive button
and
disable click function of 2nd row Inactive button , enable click function for Active button
likewise rest of it.

Here the current cshtml code for this table view button function
<div class="btn-group btn-toggle" id="btn-toggle">
@if (item.Status == true)
{
<button class="btn btn-xs active btn-primary" data-HEI_ID = "@item.HEI_ID" data-status = "true" >Active</button>
<button class="btn btn-xs inactiveColor btn-default" data-HEI_ID = "@item.HEI_ID" data-status = "false" >Inactive</button>
}
else
{
<button class="btn btn-xs btn-default" data-HEI_ID = "@item.HEI_ID" data-status = "true" >Active</button>
<button class="btn btn-xs inactiveColor btn-primary active" data-HEI_ID = "@item.HEI_ID" data-status = "false" >Inactive</button>
}
</div>
This is JavaScript code snippet to handle this buttons
$('.btn-toggle').click(function () {
$(this).find('.btn').toggleClass('active');
//if ($(this).find('btn-primary').toggleClass('active')) {
//$(this).prop('disabled', true);
//}
if ($(this).find('.btn-primary').size() > 0) {
$(this).find('.btn').toggleClass('btn-primary');
}
if ($(this).find('.btn-danger').size() > 0) {
$(this).find('.btn').toggleClass('btn-danger');
}
if ($(this).find('.btn-success').size() > 0) {
$(this).find('.btn').toggleClass('btn-success');
}
if ($(this).find('.btn-info').size() > 0) {
$(this).find('.btn').toggleClass('btn-info');
}
$(this).find('.btn').toggleClass('btn-default');
});