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

[Solved] GridView drag-and-drop exception

2 Answers 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard
Top achievements
Rank 1
Richard asked on 29 Jan 2011, 12:28 AM
Hi,


Our tester was trying to break the app by doing random things in the UI. While doing this, he ran into the following exception:

System.NullReferenceException: Object reference not set to an instance of an object.  
at Telerik.Windows.Controls.GridView.DragDropHelper.AttachToPopupHost(UIElement element)  
at Telerik.Windows.Controls.GridView.DragDropController.OnHeaderCellDragQuery(Object sender, DragDropQueryEventArgs e)
at Telerik.Windows.Controls.DragDrop.DragDropQueryEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)  
at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)  
at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)  
at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)  
at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)  
at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.DragDropProvider_DragQuery(Object sender, DragDropQueryEventArgs e)  
at Telerik.Windows.Controls.DragDrop.DragDropProviderBase.RaiseDragQuery()

Unfortunately we haven't been able to reproduce this... and the tester doesn't remember what specifically he did before the problem occurred.

Do you have any ideas? We're using the Q3 2010 release.


Here is the markup for the grid that raised the exception:

<telerik:RadGridView x:Name="gvAccounts" Grid.Row="2" Grid.ColumnSpan="3" Margin="0 0 10 0" ItemsSource="{Binding AccountMappings}"
    AutoGenerateColumns="False" AlternationCount="2" ShowGroupPanel="False" IsSynchronizedWithCurrentItem="True"
    SelectionMode="Single" TabNavigation="Once" CanUserFreezeColumns="False" MinHeight="150">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Alias Account" DataMemberBinding="{Binding AliasAccountName}" IsReadOnly="True" />
        <telerik:GridViewDataColumn Header="Nominal Size" DataMemberBinding="{Binding AliasNominalSize}" IsReadOnly="True" DataFormatString="{}{0:c2}" TextAlignment="Right" />
        <telerik:GridViewDataColumn Header="Broker Account" DataMemberBinding="{Binding SelectedBrokerAccount.Name}">
            <telerik:GridViewDataColumn.CellEditTemplate>
                <DataTemplate>
                    <telerik:RadComboBox ItemsSource="{Binding AvailableBrokerAccounts}" SelectedItem="{Binding SelectedBrokerAccount, Mode=TwoWay}"
                        CanAutocompleteSelectItems="True" CanKeyboardNavigationSelectItems="True" DisplayMemberPath="Name"  />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellEditTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>


Thanks,
Richard

2 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 31 Jan 2011, 09:54 AM
Hi Richard,

We have investigated the problem described and found some specifics that could potentially lead this issue.

What I can recommend is to to check our next internal build and let us know if the problem can be reproduced there.

Also, if you are able to reproduce this issue consistently, we would be happy if you could share additional information about the scenario and the steps to reproduce.

Best wishes,
Tsvyatko
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Richard
Top achievements
Rank 1
answered on 01 Feb 2011, 06:22 AM
Hi Tsvyatko,

Thanks for looking into it. Since we can't reproduce the issue, we'll probably leave it alone for now. But if it happens again, we'll try the latest internal build like you suggested.

Thanks,
Richard

Tags
GridView
Asked by
Richard
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Richard
Top achievements
Rank 1
Share this question
or