More in this section
Forums / General Discussions / How to Get Developer Name in Poll Widgets

How to Get Developer Name in Poll Widgets

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Ketan
    Ketan avatar
    29 posts
    28 Mar 2014
    26 May 2014
    Link to this post

    In this code that i taken from below site..

     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..

  2. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    19 Apr 2017
    31 May 2014
    Link to this post
    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;

    Nikola Zagorchev
    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
2 posts, 0 answered