reading the gridview cell value
-
i have used this javascript and code for selecting a row in gridview. From this i'll be getting index of the row. its working fine but what i want is the cell value(of any columm) of that selected row can anybody tell me what to do to read the cell value.
function onGridViewRowSelected(rowIdx)
{ var selRow = getSelectedRow(rowIdx);
if (curSelRow != null)
{curSelRow.style.backgroundColor = '#ffffff';}
if (null != selRow)
{ curSelRow = selRow;
curSelRow.style.backgroundColor = '#ffff99';
document.getElementById('txtId').value =rowIdx ;}
}
code:
protected void gvAuditErrors_RowCreated(object sender, GridViewRowEventArgs e)
{ if (e.Row.RowType == DataControlRowType.DataRow)
{e.Row.Attributes.Add("onclick", "onGridViewRowSelected('"- m_iRowIdx.ToString() + "')");}
m_iRowIdx++;}
}
thanks in advance:):)
- m_iRowIdx.ToString() + "')");}
-
i have used this javascript and code for selecting a row in gridview. From this i'll be getting index of the row. its working fine but what i want is the cell value(of any columm) of that selected row can anybody tell me what to do to read the cell value.
function onGridViewRowSelected(rowIdx)
{ var selRow = getSelectedRow(rowIdx);
if (curSelRow != null)
{curSelRow.style.backgroundColor = '#ffffff';}
if (null != selRow)
{ curSelRow = selRow;
curSelRow.style.backgroundColor = '#ffff99';
document.getElementById('txtId').value =rowIdx ;}
}
code:
protected void gvAuditErrors_RowCreated(object sender, GridViewRowEventArgs e)
{ if (e.Row.RowType == DataControlRowType.DataRow)
{e.Row.Attributes.Add("onclick", "onGridViewRowSelected('"- m_iRowIdx.ToString() + "')");}
m_iRowIdx++;}
}
thanks in advance:):)
plz help me out of this problem
- m_iRowIdx.ToString() + "')");}