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

S

Sameeksha

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top