This is a migrated thread and some comments may be shown as answers.

GetPopupPlacement() null reference exception

9 Answers 17 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 09 Apr 2014, 06:57 PM
I'm seeing a runtime error in the Telerik Silverlight controls (attached). I'm wondering if anyone has seen this error and has any advice on how to troubleshoot it.

9 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 14 Apr 2014, 10:52 AM
Hi Scott,

May I ask you for more details on your case - which of the Telerik Controls are you using and which one is raising this error? Are you using RadComboBox, RadMenu, RadDropDownButton, etc.?
In order to debug your Silverlight code you should enable Silverlight debugging in your ASP.NET project (if you have such) - right click on the ASP.NET project, go to Web and check the Silverlight Checkbox. After that go to Visual Studio's Debug menu, select Exceptions and check all of the boxes there. This way you'll be able to see exactly where the issue occurs.

I've recorded a short video demonstrating all of the above steps. Hope this helps.

Regards,
Rosen Vladimirov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Scott
Top achievements
Rank 1
answered on 16 Apr 2014, 06:52 PM
I'm using several controls such as RadBusyIndicator, RadDocking, RadDatePicker, RadNumericUpDown, etc. The one that is causing the error is RadComboBox. Enabling Silverlight Debugging caused some different behavior but didn't give me much more information. Instead of the original error I got a prompt to debug in a new instance of Visual Studio (attached JIT.png). When I tried that, I just got a similar error (attached unhandledexception.png). There was a little more detail in the stack trace (attached stacktrace.PNG).
0
Rosen Vladimirov
Telerik team
answered on 17 Apr 2014, 08:22 AM
Hi Scott,

May I ask you for more details on your scenario - we've tried to reproduce the issue based on the stack trace, but with no luck. Could you provide some parts of your code, so we'll be able to investigate the issue on our side. It looks like the problem is caused by the Popup of RadComboBox, you can try turning AnimationManager off for RadComboBox (set telerik:AnimationManager.IsAnimationEnabled="False").

I'm looking forward to hearing from you.

Regards,
Rosen Vladimirov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Scott
Top achievements
Rank 1
answered on 18 Apr 2014, 09:38 PM
We are using it in a DataTemplate such as (with all variables renamed to foo):

<DataTemplate x:Key="DropdownTemplate">
    <telerik:RadComboBox ItemsSource="{Binding foo}"
                         Text="{Binding foo, Mode=OneWay}"
                  Background="{Binding foo}" Foreground="{Binding foo}"
                  OpenDropDownOnFocus="{Binding foo}"
                  IsEnabled="{Binding Path=foo, Converter={StaticResource foo}}"
                  IsEditable="{Binding Path=foo, Converter={StaticResource foo}}"
                  KeyUp="RadComboBox_KeyUp"
                  LostFocus="RadComboBox_LostFocus"
                  SelectionChanged="RadComboBox_SelectionChanged"/>
</DataTemplate>

Is there a way to set that declaratively in the xaml?
0
Kalin
Telerik team
answered on 22 Apr 2014, 07:44 AM
Hi Scott,

Thank you for sharing these details. You can set the IsAnimationEnabled property in XAML:
<telerik:RadComboBox ItemsSource="{Binding foo}" telerik:AnimationManager.IsAnimationEnabled="False" >

Could you share some more details on your case, what is this DataTemplate - are you using RadComboBox inside RadDropDownButton? If you can provide sample application reproducing the issue, it will be a great help for us.

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Scott
Top achievements
Rank 1
answered on 08 May 2014, 05:03 PM
Unfortunately setting IsAnimationEnabled to false did not fix the issue. I can confirm that the issue doesn't happen in IE 11, Chrome, or Firefox. It only happens in IE 10.

Regarding the DataTemplate: it is not inside a RadDropDownButton. I inherited this code so I'm not completely familiar with it. It is used by a Telerik.Windows.Controls.DataTemplateSelector. I'm not sure how to get you a sample to reproduce it.

Thanks,
Scott
0
Kalin
Telerik team
answered on 09 May 2014, 07:59 AM
Hi Scott,

Could you please share the code of the DataTemplateSelector you have implemented as well as the Xaml where you are using it? On which control you are applying it?

I'm looking forward to your reply.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Scott
Top achievements
Rank 1
answered on 05 Jun 2014, 08:28 PM
This is not the exact code but hopefully it shows you enough context of what we are doing.

Xaml:
<DataTemplate x:Key="DropdownTemplate">
  <telerik:RadComboBox ItemsSource="{Binding foo}"
     Text="{Binding foo, Mode=OneWay}"
     Background="{Binding foo}" Foreground="{Binding foo}"
     OpenDropDownOnFocus="{Binding foo}"
     IsEnabled="{Binding Path=foo, Converter={StaticResource foo}}"
     IsEditable="{Binding Path=foo, Converter={StaticResource foo}}"
     KeyUp="RadComboBox_KeyUp"
     LostFocus="RadComboBox_LostFocus"
     SelectionChanged="RadComboBox_SelectionChanged"/>
</DataTemplate>
 
<local:PropertyValueCellTemplateSelector x:Key="valueCellTemplateSelector"
  FooTemplate="{StaticResource FooTemplate}"
  ValueChoiceTemplate="{StaticResource DropdownTemplate}"/>
 
<telerik:RadGridView Name="fooGridView"
  ItemsSource="{Binding foo}"
  AutoGenerateColumns="False"
  CanUserResizeColumns="True"
  CanUserSortColumns="False"
  CanUserInsertRows="False"
  CanUserReorderColumns="False"
  IsFilteringAllowed="False"
  ShowColumnHeaders="False"
  AutoExpandGroups="True"
  ShowGroupPanel="False"
  RowIndicatorVisibility="Collapsed"
  RowLoaded="propertiesGridView_RowLoaded"
  SelectedItem="{Binding foo, Mode=TwoWay}"
  SelectionMode="Single"
  VerticalContentAlignment="Top"
  HorizontalContentAlignment="Left"
  ScrollMode="Deferred"
  CanUserDeleteRows="False" >
  <telerik:GridViewDataColumn Header="foo"
    DataMemberBinding="{Binding foo, Mode=TwoWay}"
    CellTemplateSelector="{StaticResource valueCellTemplateSelector}"
    EditTriggers="TextInput" IsReadOnly="True"/>
</telerik:RadGridView>

VB.NET:
Imports Telerik.Windows.Controls
 
Public Class PropertyValueCellTemplateSelector
    Inherits DataTemplateSelector
 
    Public Sub New()
    End Sub
 
    Public Property FooTemplate() As DataTemplate
    Public Property ValueChoiceTemplate As DataTemplate
 
    Public Overloads Overrides Function SelectTemplate(ByVal item As Object, ByVal container As DependencyObject) As DataTemplate
        Dim foo As Bar = CType(item, Bar)
        MyBase.SelectTemplate(item, container)
        If foo.Bar IsNot Nothing Then
            Return Me.ValueChoiceTemplate
        Else
            Return Me.FooTemplate
        End If
 
End Class
0
Kalin
Telerik team
answered on 09 Jun 2014, 10:43 AM
Hi Scott,

I was not able to reproduce the described issue in sample project using the provided code snippets. I'm attaching the test project here and if you are able to modify it in order to reproduce the issue that would be really helpful for us.

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
General Discussions
Asked by
Scott
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Scott
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or