ASP.NET ObjectDataSource UpdateMethod Exception Handling -


i have gridview control on page connected objectdatasource typename="bll.mylogic" dataobjecttypename="bll.myobject" updatemethod="myupdatemethod".

the update in myupdatemethod conditional checking conditions before _datacontext.submitchanges(). depending on check throw exceptions ("not unique") or ("no appropiate logic found") etc. catching these exceptions @ page level via onupdated="mydataupdated" of objectdatasource.

these operations work fine. problem after process done , in case of "exception occured" gridview gets reloaded , editindex = -1 (initiated). if manually retrieve editindex , make editable form data (data input user) in edittemplate gets wipped away. viewstate doesnt work here.

what work around situation ?

thanks in advance.

have tried setting gridviewupdatedeventargs.keepineditmode property true in rowupdated event handler?


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -