1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / SaveContent on LibraryItemEdit

SaveContent on LibraryItemEdit

3 posts, 0 answered
  1. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    30 Nov 2009
    Link to this post
    Hi,    
    I´m adding some funcionality to Library module, and I´ve created a LibraryItemEditCustom class that inherit LibraryItemEdit. I´ve overrided method SaveContent on my LibraryItemEditCustom class, but it seems that code doesn´t reach method SaveContent.
    I don´t know why, because I´ve done the same with GenericContent module and News module, and in both cases, all work perfectly.

    Could you please give some guide?

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    30 Nov 2009
    Link to this post
    Hi mgrp,

    You can override  InitializeControls and there subscribe for
    SaveButton1.Command += new CommandEventHandler(SaveButton_Command); Inside the event you can use LibManager.SaveContent method to make your custom logic. Note that, by doing so you have to persists all data, becase you will not be able to use the default logic from SaveButton1.Command.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    30 Nov 2009
    Link to this post
    Hi Ivan,

    Now I´m doing something like the solution you have given to me.
    I´ve subscribed for Command event, in my command event code, I do what I have to do, and then I call LibraryItemEdit.SaveButton_Command. And works!

    Thanks for all!
Register for webinar
3 posts, 0 answered