.Net interview question

Posted by Priyatham under Interview Questions on 7/3/2013 | Points: 10 | Views : 1810 | Status : [Member] | Replies : 1
Gridview.EditIndex = -1; why we are using this statement



Posted by: Nadeemshaik on: 7/3/2013 [Member] Starter | Points: 25

If we are in Gridview's Edit or Update Mode, and if we do not want to have any gridview's row in edit mode, we have to set EditIndex = -1.

Gridview's row index starts from 0 to n-1, hence if you set any other value other than -1, your gridview will be still in edit mode.

Priyatham, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response