Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
here's a snapshot of problem.

http://picturepush.com/public/12511015[^]
protected void _GRD1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
   {
       string s = ((TextBox)_GRD1.Rows[e.RowIndex].FindControl("TextBox1")).Text;
   }


error msg is RowIndex doesnot exist.
Posted
Comments
Sergey Alexandrovich Kryukov 25-Mar-13 19:10pm    
All you need is just a bit more of attention... :-)
—SA

1 solution

Don't mix up two different event arguments types used in different events: System.Web.UI.WebControls.GridViewUpdateEventArgs and System.Web.UI.WebControls.GridViewUpdatedEventArgs: first one does have RowIndex, and the second one does not:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewupdateeventargs.aspx[^],
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewupdatedeventargs.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