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

NullReferenceException with RadListPicker

7 Answers 99 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pat
Top achievements
Rank 1
Pat asked on 31 Aug 2011, 05:25 PM
 I am getting a Null reference when trying to use the ListPicker

The call stack is below

> Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadSelector.f(int A_0 = 0x00000002) + 0x14 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadSelector.OnApplyTemplate() + 0x48 bytes 
  Telerik.Windows.Controls.Input.dll!Telerik.Windows.Controls.RadListPicker.OnApplyTemplate() + 0x6 bytes 

The XAML to create the ListPicker is

                <StackPanel Orientation="Horizontal">
                    <TextBlock Name="NameFieldBlock" Margin="10" MinWidth="160" TextAlignment="Right">Name field:</TextBlock>
                    <telerikInput:RadListPicker InlineModeThreshold="4" Name="NameFieldList">
                        
                    </telerikInput:RadListPicker>
                </StackPanel>
 

I have set the ItemsSource to be  a list of strings. I have also set the Header to be "".

Any suggestions for what I am doing wrong.

Thanks

7 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 02 Sep 2011, 09:02 AM
Hi Pat,

Thank you for contacting us.

We recently found a bug - a NullReferenceException - with our list picker. The problem occurs when the picker has no or empty ItemsSource and setting its IsExpanded property to true. Otherwise the control should behave as expected - I verified it on my side.

Could you please prepare a simple project that demonstrates the issue so that I may debug it and isolate the cause.

Thank you for your time, I am looking forward to your reply.

All the best,
Georgi
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Pat
Top achievements
Rank 1
answered on 02 Sep 2011, 06:20 PM
I believe I was hitting the problem you described. I  was not setting up the ItemsSource correctly and when I checked it with the debugger the ItemsSource was not set. After settting the ItemsSource the problem went away.

Thanks for the prompt response.

Pat


0
Derek
Top achievements
Rank 1
answered on 03 Sep 2011, 07:06 AM
This is still an issue.  Having the ItemsSource bound to a collection that is null or contains 0 items, once the ListPicker is tapped it throws a NullReference Exception.
0
Georgi
Telerik team
answered on 06 Sep 2011, 11:27 AM
Hello Derek,

Yes, having an empty ItemsSource will also generate the problem. We are planning a service pack within somewhere 10 days that will fix this as well as some other minor bugs.

Best wishes,
Georgi
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Derek
Top achievements
Rank 1
answered on 06 Sep 2011, 06:17 PM
Great, thanks!
0
vbguru .
Top achievements
Rank 1
answered on 30 Mar 2012, 07:51 AM
I've tested your windows phone 7 package in a VMWare environment some time ago and I had that same issue.........

Is there a service pack available ??

Will it be ok to test it again to verify that it's ok before purchasing it ???

It's urgent....... We have a very strick deadline for a new project and your phone 7 package is the best I've tested (except that issue) !!!

Thank you......... Wait for your response......... 
0
Deyan
Telerik team
answered on 30 Mar 2012, 08:05 AM
Hi vbguru,

I can confirm that this issue is no longer present in our latest release.

Let me know in case you have further questions or need assistance.

Regards,
Deyan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ListPicker
Asked by
Pat
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Pat
Top achievements
Rank 1
Derek
Top achievements
Rank 1
vbguru .
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or