Technical support This forum is closed.
Version 1.x > Technical support > How to hook to OnSavedEvent when saving the document View modes: 
User avatar
Member
Member
janusz - 5/17/2005 1:34:51 PM
   
How to hook to OnSavedEvent when saving the document
Hello!

I would like to perform some additional validation before the document is saved.

The only solution to this problem that occurs to me is to create an ASCX control for one of the template attributes. Then, inside the ASCX control put some validation and override the IsValid function.

Is this correct approach or is there any other easier way?

Cheers,

Janusz

User avatar
Member
Member
wtijsma - 5/18/2005 12:28:07 PM
   
Re: How to hook to OnSavedEvent when saving the document
Hi,

You could also try to inherit from the Kentico.CMS.CMSDesk.Edit form, and enter your new form in the "cmseditpage" setting of the document template...

Never tried it though.

User avatar
Member
Member
janusz - 5/18/2005 2:48:24 PM
   
Re: How to hook to OnSavedEvent when saving the document
Thanks a lot! You have pointed me in the right direction ;)

Janusz

User avatar
Guest
admin - 5/19/2005 2:25:27 PM
   
Re: How to hook to OnSavedEvent when saving the document
Hi Janusz,

I'm sorry for the delay in answering this question. Did you managed to use the inherited control or do you need any help with this issue? Generally, the recommended procedure for the current version is using a custom field type (user control) with its own validation.

We plan to improve the validation capabilities in some of the nearest versions.

Best Regards,

User avatar
Member
Member
janusz - 5/19/2005 2:27:30 PM
   
Re: How to hook to OnSavedEvent when saving the document
Thanks. I have used the custom edit form with my own validation and it works fine.

Janusz