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

Forums / Developing with Sitefinity / Widget with control designer unique Id

Widget with control designer unique Id

5 posts, 1 answered
  1. FlR
    FlR avatar
    49 posts
    Registered:
    05 Oct 2010
    26 May 2011
    Link to this post
    I've created a widget with a control designer which can be used / place multiple times on the same page.

    Is there a way to identify this so I can bind with the correct value each widget.

    I've checked the object GenericContainer container which is coming through:
    InitializeControls(GenericContainer container) and all ids are null and there is nothing different between 2 instances of the same widget on the same page.

    Is there a way to identify this?

    Thank you!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 May 2011
    Link to this post
    Hi FlR,

    You can set different control ID to the widgets, you can add some data in page.Items to store objects that will allow you to identify the controls.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. FlR
    FlR avatar
    49 posts
    Registered:
    05 Oct 2010
    26 May 2011
    Link to this post
    Hi Ivan,

    By seeting different control ID to widgets are you referring when I'm registering the widget in Sitefinity or by code behind?

    Please tell me if you have a sample code for this approach or for page.Items approach.

    My dificulty is in identifying my custom widgets (same time) which are placed multiple times on a page.

    In one instance I need to display a specific info, in another instance other info (based on what the admin set in the control designer for each widget instance (same type) )

    Thank you!
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 May 2011
    Link to this post
    Hello FlR,

    Check this post which seems to duplicate the current one.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
    Answered
  5. FlR
    FlR avatar
    49 posts
    Registered:
    05 Oct 2010
    30 May 2011
    Link to this post
    Hi Ivan,

    Indeed this is a duplicate. I propose to be continued to the other one. 

    Thank you!
5 posts, 1 answered