Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hey there,

Is there a difference between e.RowIndex and e.NewEditIndex ?...

will this be right GridView1.EditIndex = e.RowIndex; under gridView_Editing event and what does setting its EditIndex = -1 or 0 do?...

Could someone elaborate a bit plz..
Thanks
Amit
Posted

1 solution

GridView1.EditIndex = e.RowIndex/e.NewEditIndex
- This means the row number you want to edit.

GridView1.EditIndex = -1
- This means you want to exit from the edit mode.

Please Vote it if this clears to you.
 
Share this answer
 
v2
Comments
AmitChoudhary10 22-Sep-10 7:34am    
How 'bout a 0?...
AmitChoudhary10 22-Sep-10 7:41am    
so there is no difference between e.RowIndex and e.NewEditIndex ?...
NMehta83 22-Sep-10 9:10am    
you will get the e.NewEditIndex in the Edit Command[when you click on Edit button that same row number]
But if you want to set the edit command on custom row(the row which you want to edit) then you can set it the e.RowIndex in the RowDataBound event[you can set the edit functionality on perticular row which you want to edit without clicking on the Edit button]
AmitChoudhary10 23-Sep-10 1:14am    
Thanks Man...

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