Answered by:
Silverlight component on CRM 2011 form

Question
-
Dear all,
On my form, I add a silverlight component in a tab/section. If I set the tab/section "Visible by default = TRUE", then it displays correctly.
But if I set that tab/section "Visible by default = FALSE" and in my onload jscript, I conditionally set it visible=TRUE (setVisible), then the silverlight component is just empty!!
Do you have workaround for this issue?
Many thanks!
- Edited by NGMKha Friday, November 23, 2012 2:32 AM
Friday, November 23, 2012 2:29 AM
Answers
-
I found out the problem, I think it's a bug in CRM. In my onload, I add it
var s = document.getElementById("WebResource_silverlight");
s.style.height = "100%"
and then it's visible again :)
- Marked as answer by NGMKha Tuesday, November 27, 2012 7:34 AM
Tuesday, November 27, 2012 7:13 AM
All replies
-
I tried to replace my component by an empty silvelight component (create new empty silverlight application in VS studio 2010) and it's still the same issue:
Section contain the silverlight component.
Section.Visible by default = false.
In my onload:
getSection().setVisible(true) => the silverlight component is NOT loaded!
If I set Section.Visible by default = true and it's OK.
Thanks- Edited by NGMKha Monday, November 26, 2012 2:30 AM
Friday, November 23, 2012 6:55 AM -
I still cannot find the solution for this. any helps please?Monday, November 26, 2012 2:31 AM
-
Hi,
Check the Tab/Section's Visible by Default parameter to TRUE. Just Write your JScript code in the Event you need.
Naren
Monday, November 26, 2012 5:24 AM -
Hi,
I have a section with silverlight component that is visible depending on the status of records.
I could not set it Visible by default = TRUE and then hide it if not applicable because the screen loading is NOT smooth.
I have to hide it by default and only show it if needed.
- Edited by NGMKha Monday, November 26, 2012 6:52 AM
Monday, November 26, 2012 6:51 AM -
In IE, using F12, I navigated to my element and found out that the height = 0px! (style="width: 100%; height: 0px; visibility: visible;")
<object tabIndex="1240" id="WebResource_silverlight" data="data:application/x-silverlight" type="application/x-silverlight" altHtml="<a id="WebResource_silverlight" href=http://go.microsoft.com/fwlink/?LinkID=124807 style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>" style="width: 100%; height: 0px; visibility: visible;" desiredWidth="0" desiredHeight="0" resizeMode="StretchToFit" control="[object Object]">
Can I set it back to 100%? Thanks
- Edited by NGMKha Tuesday, November 27, 2012 6:52 AM
Tuesday, November 27, 2012 6:51 AM -
I guess the silverlight is not getting rendered on page load..try to find a sol for rendering it without showing it.
If it helps, Mark as answer to help others..else it's scrap
Tuesday, November 27, 2012 7:06 AM -
I found out the problem, I think it's a bug in CRM. In my onload, I add it
var s = document.getElementById("WebResource_silverlight");
s.style.height = "100%"
and then it's visible again :)
- Marked as answer by NGMKha Tuesday, November 27, 2012 7:34 AM
Tuesday, November 27, 2012 7:13 AM