<td role="gridcell">input</td>
<td role="gridcell">1</td>
<td role="gridcell">
<input class="remove1" type="button" value="▼" style="margin: 4px">
<input id="Txt_test" class="txtBox" type="textbox" value="220" style="margin: 4px">
<input class="Add1" type="button" value="▲" style="margin: 4px">
</td>
<td style="display:none" role="gridcell">
</td>
</tr>
<tr class="k-alt" role="row">
<td role="gridcell">input</td>
<td role="gridcell">2</td><td role="gridcell">
<input class="remove1" type="button" value="▼" style="margin: 4px">
<input id="Txt_test" class="txtBox" type="textbox" value="59" style="margin: 4px">
<input class="Add1" type="button" value="▲" style="margin: 4px">
</td>
</tr>
</tbody>
top was my out put Html
Then i using JQuery to change below code to disable or readonly but it didn't work!
<input id="Txt_test" class="txtBox" type="textbox" value="220" style="margin: 4px">
I Try on kendo Ui with JQuery
$("#Txt_test").attr('disabled', true);
and
$("#Txt_test").prop('readonly', true);
and change class
$(".txtBox").attr('disabled', true);
I have change input type="text" same error for me. also I try
var clearAddGrid = $("#AddGrid").data('kendoGrid');
clearAddGrid.editable = false;
I want achieve like below
if(status==0)
{
Grid input can edit
}else{
Grid input can't edit
}
and this is my grid cells
{ field: "txtRealNum", title: "RealNum", width: "40px", template: '<input class="remove1" type="button" value="▼" style="margin: 1px" /><input id="Txt_test" class="txtBox" type="textbox" value= #=txtRealNum# style="margin: 4px" /><input class="Add1" type="button" value="▲" style="margin: 1px" />' },
my grid
$("#AddGrid").kendoGrid({
dataSource: AddGriddataSource,
selectable: "row",
scrollable: false,
columns: AddGridCells,
change: numberInput,
pageable: {
buttonCount: 3,
messages: GridPageMsg
},
height: '100%',
editable: true
}).data("kendoGrid");