G
Guest
Hi
I use the Datagrid webcontrol on my web page, and I use the following client-side javascript to duplicate the current row to the datagrid. But when I loop through the data in datagrid from codebehind, it does not include this new row. Did I miss something? What should I do to reference this new row from codebehind? Thanks
JP Goo
var oTable = document.getElementById("myDataGrid")
var iCurRowIndex = window.event.srcElement.parentElement.parentElement.rowIndex
var oCurRow = oTable.rows(iCurRowIndex)
var oNewRow
var oNewCell
oNewRow = oTable.insertRow(iCurRowIndex + 1)
oNewRow.align = "Center"
for (var i = 0; i < oCurRow.cells.length; i++)
oNewCell = oNewRow.insertCell(-1)
oNewCell.innerHTML = oCurRow.cells(i).innerHTML
}
I use the Datagrid webcontrol on my web page, and I use the following client-side javascript to duplicate the current row to the datagrid. But when I loop through the data in datagrid from codebehind, it does not include this new row. Did I miss something? What should I do to reference this new row from codebehind? Thanks
JP Goo
var oTable = document.getElementById("myDataGrid")
var iCurRowIndex = window.event.srcElement.parentElement.parentElement.rowIndex
var oCurRow = oTable.rows(iCurRowIndex)
var oNewRow
var oNewCell
oNewRow = oTable.insertRow(iCurRowIndex + 1)
oNewRow.align = "Center"
for (var i = 0; i < oCurRow.cells.length; i++)
oNewCell = oNewRow.insertCell(-1)
oNewCell.innerHTML = oCurRow.cells(i).innerHTML
}