已选中复选框但未启用文本框 [英] Checkbox is already checked but textbox isnt enabled
问题描述
我使用了CheckBox Checked启用文本框之类的功能,它工作正常但是在网格视图行中单击编辑按钮出现弹出窗口,其中所有行列都处于编辑模式但未选中此复选框且文本框不是启用
我用web方法获取网格行的所有行并使用了支柱
[webmethod] $(' <%= chk.clientid%>')。prop(< span class =code-string>' checked',obj.kmc)
这是检查复选框但是如何启用文本框
$(' <%= txt.clientid')。val(obj.txt);
如果选中复选框,这应该在行上启用
任何想法?
帮助??
我尝试过:
此函数正常处理文本框,但在gridview中的行编辑中,它不是
function changevalue(复选框){
document .getElementById(' & lt;%= inputKmcCode.ClientID%>')。style.display = checkbox.checked? ' block':' 无跨度>;
}
& lt; / script
( ' <%= chk.clientid%>')。prop(' < span class =code-string> checked',obj.kmc)这是检查复选框但是如何启用文本框
(' <%= txt.clientid')。val( obj.txt);如果选中复选框,这应该在行上启用
任何想法?
帮助??
我尝试过:
这个函数正常处理文本框,但是在gridview的行编辑中它不是
function changevalue(复选框){
document .getElemen tById(' & lt;%= inputKmcCode.ClientID%>')。style.display = checkbox.checked? ' block':' 无跨度>;
}
& lt; / script
当您调用复选框时,请在javascript函数内部尝试以下内容/>
function changevalue(复选框){
var chkbox =
I have Used A function like CheckBox Checked Enable Textbox, It is working fine but On clicking edit button in grid view row A pop up appears with all row columns in edit mode but this check box isn't checked and textbox is not enabled
I have used web method to get all the rows of grid row and used a prop
[webmethod] $('<%=chk.clientid%>').prop('checked', obj.kmc)
this is checking the checkbox but how to enable the text box
$('<%=txt.clientid').val(obj.txt);
this should enable on row only if check box checked
any ideas??
help ??
What I have tried:
this function working on textbox normally, but on row edit in gridview it isnt
function changevalue(checkbox) {
document.getElementById('<%= inputKmcCode.ClientID%>').style.display = checkbox.checked ? 'block' : 'none';
}
</script
('<%=chk.clientid%>').prop('checked', obj.kmc)this is checking the checkbox but how to enable the text box
('<%=txt.clientid').val(obj.txt);this should enable on row only if check box checked
any ideas??
help ??
What I have tried:
this function working on textbox normally, but on row edit in gridview it isnt
function changevalue(checkbox) { document.getElementById('<%= inputKmcCode.ClientID%>').style.display = checkbox.checked ? 'block' : 'none'; } </script
Please try the below inside the javascript function when you call on change of checkbox
function changevalue(checkbox) { var chkbox =
这篇关于已选中复选框但未启用文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!