On Fri, Aug 27, 2010 at 8:18 PM, Steve Mactaggart <st...@whitesquaresoft.com > wrote:
> That would work I guess, but I don't think it makes sense to build that > logic into the dropdown, this is a function for the model, so I guess if > there are no existing ways to do it i'll have to look at writing a > "ChangeTrackedModel" or the like to wrap existing models in to manage the > change. > Something like this might work for you: http://pastebin.com/katiSsGq <http://pastebin.com/katiSsGq>That's just a quick-and-dirty approach - there are likely optimizations that can be made to that code. > What I really want to be able to do is in the ajax event determine if I > want > to allow the user to continue with the change, present them with a dialog > or > just cancel the change. > Seems like you may want a validator instead. > And I wan to be able to just attach this logic to existing components > without having to extend classes all over the shop. > Again, probably a validator, although the IModel solution is also reusable. -- Jeremy Thomerson http://www.wickettraining.com