How to Get Developer Name in Poll Widgets

Posted by Community Admin on 03-Aug-2018 12:21

How to Get Developer Name in Poll Widgets

All Replies

Posted by Community Admin on 26-May-2014 00:00

In this code that i taken from below site..

www.sitefinity.com/.../poll-widget-

 i configure as see in this above link.

but i have small dought how can i get Devleoper Name in Code. because this Code put static value, from that value i have to put dynamic value, so how can i change that..

Posted by Community Admin on 31-May-2014 00:00

Hello Ketan,

You can get all controls in the form you reference in the poll widget, iterate the form controls and get or set the name for developers of the one you like the following way:

if (!SystemManager.IsDesignMode)
               
                   //retrieve the checkbox control from the list of controls in the form
                   foreach (object control in base.FormControls.Controls[1].Controls)
                   
                       if (control.GetType() == typeof(FormCheckboxes))
                       
                           FormCheckboxes checkBoxControl = control as FormCheckboxes;
                           string nameForDev = checkBoxControl.DataFieldName;
                       
                   
               



Regards,
Nikola Zagorchev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed