Persist widget's default values

Posted by Community Admin on 04-Aug-2018 16:32

Persist widget's default values

All Replies

Posted by Community Admin on 17-Mar-2014 00:00

Hi

Say I have some default string properties in my widget controller. I want to dynamically populate and save those widget properties as soon as it is dragged onto the page. E.g:

 public string MyString get;set;;

If this is my property, how do I populate and persist the time that it was dragged onto the page (as a string)? Is using the web service necessary? 

Thanks,

Kurren

Posted by Community Admin on 18-Mar-2014 00:00

Anyone have any idea on how to save a widget's properties? I think I have the first few lines of code:       

public ActionResult Index()
       
            if (MyString == null)
                var svc = new Telerik.Sitefinity.Modules.Pages.Web.Services.ControlPropertyService();
                svc.SaveProperties(...);
             

Any help will be great

Kurren

Posted by Community Admin on 20-Mar-2014 00:00

For anyone else reading this, I contacted support and was told that there is currently no way to give a widget default values and save them.

 Kurren

This thread is closed