This is a migrated thread and some comments may be shown as answers.
RadCompactButton not working when building RadSocialShare Dynamically
1 Answer 6 Views
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 28 Mar 2017, 08:15 PM

when i build the RadSocialShare dynamically, the RadCompactButton does not work (dialog does not popup with items in the CompactButtons list

 

- working in ASP .net4.5

- No javascript erra's

- I can get to work if i build in markup as described in help documents

- does not work when building the radSocialShare control dynamically

 

<<< Suedo Code >>>

private RadSocialShare CreateRadSocialShareButtons()
{
RadSocialShare radSocialShare = new RadSocialShare();
myList = GetButtonList();  //get my list of social controls items

foreach (ListItem item in myList)
{   //check if button enabled for sharing
if (item.Enabled)
{   //start setting standard properties
RadSocialButton socialButton = new RadSocialButton();
socialButton.SocialNetType = (SocialNetType)Enum.Parse(typeof(SocialNetType), item.SocialNetType);
socialButton.CssClass = "SocialShareButtons";
socialButton.ToolTip = item.SocialSite; //display in tooltip (e.g. Facebook)

if (item.ShowInMain)
{   //display in main list
radSocialShare.MainButtons.Add(socialButton);
}
else
{   //display in compact list
radSocialShare.CompactButtons.Add(socialButton);
}
}
}

if (radSocialShare.CompactButtons.Count > 0)
{ //<!------THIS SHOWS UP ON PAGE, BUT DOES NOTHING---   !>
RadCompactButton radCompactBtn = new RadCompactButton();
radCompactBtn.ToolTip = "See More Social Share Types";
radSocialShare.MainButtons.Add(radCompactBtn);
}
return radSocialShare;
}

1 Answer, 1 is accepted

Sort by
0
Ricardo
Top achievements
Rank 1
answered on 29 Mar 2017, 06:54 PM
my bad, its working as designed...
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Ricardo
Top achievements
Rank 1
Share this question
or