本文介绍了如何在单击“更新”按钮时获取gridView行值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个场景,我需要在点击dB之前检查行值以存储这些值,当我尝试获取行特定列的值时会出现问题。现在假设,如果我在网格中有一个文本框,然后我单击编辑,打开特定行进行编辑,单击提交/确定按钮我需要检索文本框的最新值,但javascript获取以前的值。
以下是使用的Javascript / jquery
Hi,
I have a scenario where i need to check the row values before hitting the dB to store those values,the issue arises when I try to fetch the value of the row specific column. Now suppose, if i have a text box in the grid and then I click on Edit that makes a particular row open for edit on click of submit/ok button I need to retrieve the latest value of the Textbox but the javascript fetches the previous value.
The following is the Javascript/jquery used
function GetSelectedRow(lnk) {
var row = lnk.parentNode.parentNode;
var rowIndex = row.rowIndex - 1;
var customerId = row.cells[0].innerHTML;
var city = row.cells[1].getElementsByTagName("input")[0].value;
alert("RowIndex: " + rowIndex + " CustomerId: " + customerId + " City:" + city);
return false;
}
任何帮助.... ............
Any help................
推荐答案
这篇关于如何在单击“更新”按钮时获取gridView行值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!