This question is locked. New answers and comments are not allowed.
Hello ,
I have a normal grid to witch I do Ajax editing. Some columns in the grid are readonly and the value
of this columns is calculated with the value of close by columns. I get the OnEditValue event and I try to change the value
in the readonly cell:
function onEditFK(e)
{
if (e.value == "0") {
document.getElementById('qTons').readOnly = false;
document.getElementById('qTons').style.backgroundColor = 'white';
} else {
document.getElementById('qTons').readOnly = true;
document.getElementById('qTons').style.backgroundColor = 'gray';
$.post('<%=Url.Action("CalculateTons", "Quarry")%>',
{ value: e.value },
function (result) {
document.getElementById('qTruckValue').value = result;
document.getElementById('qTons').value = result * document.getElementById('qLoadCountNr').value;
document.getElementById('qTruckValue').focus();
document.getElementById('qTons').focus();
});
}
}
My problem is that qTons is readOnly and the focus() gives an error in IE8 . Is there a way to refresh the value in qTons while editing ?
I have a normal grid to witch I do Ajax editing. Some columns in the grid are readonly and the value
of this columns is calculated with the value of close by columns. I get the OnEditValue event and I try to change the value
in the readonly cell:
function onEditFK(e)
{
if (e.value == "0") {
document.getElementById('qTons').readOnly = false;
document.getElementById('qTons').style.backgroundColor = 'white';
} else {
document.getElementById('qTons').readOnly = true;
document.getElementById('qTons').style.backgroundColor = 'gray';
$.post('<%=Url.Action("CalculateTons", "Quarry")%>',
{ value: e.value },
function (result) {
document.getElementById('qTruckValue').value = result;
document.getElementById('qTons').value = result * document.getElementById('qLoadCountNr').value;
document.getElementById('qTruckValue').focus();
document.getElementById('qTons').focus();
});
}
}
My problem is that qTons is readOnly and the focus() gives an error in IE8 . Is there a way to refresh the value in qTons while editing ?