Clicking on a datagrid row selects it but doesn't update prev row

Clicking on a datagrid row selects it but doesn't update prev row

Post by U2FtZWVrc2 » Fri, 08 Apr 2005 19:05:04


I have a datagrid with first column as EditCommandColumn. I've made this
column as invisible. I want to get a row into edit mode when user clicks
anywhere in the row. For that purpose I added the following code to the
ItemDataBound event handler:
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)

e.Item.Attributes.Add("onclick",Page.GetPostBackClientHyperlink((Button)e.Item.Cells[0].Controls[0]),"");

It's getting the row clicked by the user in edit mode. But along with that I
want to 'update' the previous row, which the user was editing before clicking
on the new row. Can anybody suggest a solution?
--
Sameeksha,
MCP (.NET)