Updating to SP1: Error InvalidCastException

5 posts, 1 answers
  1. Deepak Shakya
    Deepak Shakya avatar
    118 posts
    Member since:
    Aug 2007

    Posted 03 Jan 2012 Link to this post

    Hi,

    I just updated to Q3 2011 SP1 so that I can get more document support for PDF viewer. After the installation and the upgrade wizard in VS2010, I have now reference to assemblies of version: 2011.3.1220.1040

    When I run the project, it runs fine, expect that when I click on the button to open to PDFViewer in ChildWIndow, it crashes and gives error that says that I have a InvalidCastException.

    Please see attached.

    • Basically it says that it cannot convert "System.Windows.Controls.ComboBox" to type "Telerik.Windows.Controls.RadComboBox".
    • I do not have any ComboBoxes in the childwindow. Just the PDFViewer inside a border.

    Any help is appreciated.

  2. Answer
    Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 04 Jan 2012 Link to this post

    Hello Deepak,

    Are you sure that all the references you are using are replaced with that from the Q3 SP1? This problem is certainly caused by an "old" reference. Please double check the versions of all dlls and let us know if the problem persists.

    Regards,
    Kammen
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Deepak Shakya
    Deepak Shakya avatar
    118 posts
    Member since:
    Aug 2007

    Posted 04 Jan 2012 Link to this post

    Hi Kammen,

    Thanks once again for your reply. I checked all the dlls and they were all the recent version. The problem was in the styling of the PDFViewer. I had modified the template of the PDFViewer. After upgrading, even though I had new dlls, the style was still the old one. Upon investigating the style, the old one uses ComboBox for the zoom percent whereas the new one uses RadComboBox for the zoom percent. Hence the issue of InvalidCastException.

    Solution:
    Creating a new template design from the new PDFViewer.

    Many thanks!

    However, the embedded images in the PDF document is still not being displayed.
  5. Deepak Shakya
    Deepak Shakya avatar
    118 posts
    Member since:
    Aug 2007

    Posted 04 Jan 2012 Link to this post

    Hi Kammen,

    Could you please try and open the PDF document in my skydrive and see you can view the embedded bitmap? I can see the embedded bitmap with Acrobat Reader but not with PDFViewer.

    https://skydrive.live.com/redir.aspx?cid=56c17b3fa2de6729&resid=56C17B3FA2DE6729!129&parid=56C17B3FA2DE6729!128&authkey=!AK11it3y7SFSEKc
  6. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 06 Jan 2012 Link to this post

    Hello Deepak Shakya,

    Thank you for the feedback. Extending the supported image formats is next in our to-do list. We will do our best to support as many different image formats as possible for the Q1 release of the RadPdfViewer.
    Let us know if anything else pops up.


    Greetings,
    Kammen
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner