Hi All,
Got it working. Here is the following code.
columns.Template(@<text>@if(((@item.BatchingStatus) == 0)) { <input class='box' id='assignChkBx' name='assignChkBx' type='checkbox' value='@item.LogID' /> } else { <input class='box' id='assignChkBx' name='assignChkBx' type='checkbox' value='@item.LogID' disabled='disabled'/> } </text>)
.HeaderTemplate(@<text><input class="selectAll" type="checkbox" id="allBox" onclick="toggleSelection()"/></text>).Width(20);
But I am stuck with the new problem now.
Basically I want add OR condition in my IF Statment. Following the code for the same.
Somehow the code enables all the checkboxes in the grid and its failing IF condition.
columns.Template(@<text>@if(((@item.BatchingStatus) == 0) || ((@item.AckCode) == "")) { <input class='box' id='assignChkBx' name='assignChkBx' type='checkbox' value='@item.LogID' /> } else { <input class='box' id='assignChkBx' name='assignChkBx' type='checkbox' value='@item.LogID' disabled='disabled'/> } </text>)
.HeaderTemplate(@<text><input class="selectAll" type="checkbox" id="allBox" onclick="toggleSelection()"/></text>).Width(20);
Cheers
Dino