RowDeleting event not being handled

Topics: ASP.NET 2.0
May 15, 2009 at 8:21 PM
Edited May 15, 2009 at 8:24 PM

I am trying to learn how BE uses extensions and I was able to find some sweet posts at http://rtur.net/blog/.  I am currently using BE v1.5 and trying to create the extension detailed in the following post - http://rtur.net/blog/post/2008/07/27/Writing-extensions-for-BlogEngine-14-(part-3).aspx.  When I try to delete a record from the Locations settings I get the error, "The GridView 'grid' fired event RowDeleting which wasn't handled".

I was able to track the issue down to the file BlogEngine.Web/admin/Extension Manager/Settings.ascx.cs.  It appears that the event handlers are only wired up when the Add button is used.  My extension only uses the Delete button.  I'm surprised nobody commented on the original post that the delete function did not work, then again the post was based on BE v1.4.  Can someone verify whether this logic was intended or if I just found a bug?  Thanks and keep up the great work!  I am loving this stuff!

May 18, 2009 at 1:14 AM

Nobody??

Coordinator
May 18, 2009 at 7:05 AM

I'm not that familiar with the Extensions framework, but I see what you mean that the various events (Deleting, Editing, etc) are only handled when the Add button is there.

I imagine this has not been a problem for people because Add is normally used when there are a variable number of settings a user can setup.  The user would add, edit and delete settings as needed.  If they could delete settings without being able to add them back in, then how could they get add those settings back in if they needed to?

May 18, 2009 at 1:36 PM

I agree, but the sample extension I linked to does have a valid use for the Delete button without using the Add function.  The good thing about this project being open source is that I can make updates if needed on my end.  I just wanted to make sure the issue was documented and not a potential bug.  Thanks for the reply!