Click here to Skip to main content
16,022,538 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
How to get the index of the edited row in javascript for a gridview
Posted
Comments
Sergey Alexandrovich Kryukov 26-Oct-11 20:48pm    
What is "edited row"? A row or a cell is selected, this gives you an index. Which row is the "edited row"?
--SA

1 solution

I assume you mean in-place editing of a cell.

You can handle the event System.Web.UI.WebControls.GridView.RowEditing. You handler receives event arguments of the type System.Web.UI.WebControls.GridViewEditEventArgs, it has the property NewEditIndex used to get or set the index of the row being edited.

See:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx[^],
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowediting.aspx[^],
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewediteventargs.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900