It could be related to the way youre populating your gridview, or the way youre setting your Grid View to store the Data Keys, could you post both codes, where you set up your Grid View component on your page (the html code) and where you populate it?
If it helps, paste up the full exception message generated - the one that shows the stack trace.
- When the record is deleted the gridview is re-binded with the data from database(after deleting the current record).(I think the problem is somewhere here). My databinding code is: [quote](I think the problem is somewhere here).[/quote]Royal, have you stepped through your code to see where the exception is thrown? you should be able to trace to exactly where it occurs.
Text; Line 118: string strstate = "delete from tb_citystate_master where citystate_nm= '" delval "'"; But when I check with the database the record is deleted.
Joe hi Joe, The stack trace looks something like: [Argument Out Of Range Exception: Index was out of range.
Any changes in the view state of the server control can be saved during this event.