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

InputBinding LeftDoubleClick breaks after upgrading to 2012-Q1

4 Answers 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gajan
Top achievements
Rank 1
Gajan asked on 12 Mar 2012, 11:58 AM
I have a StackPanel within a GridView with its InputBindings set to LeftDoubleClick as shown below.

<TelerikGW:RadGridView x:Name="radGridView" Grid.Row="2"
ItemsSource="{Binding SearchResult.Results}"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
MinWidth="50"
HorizontalAlignment="Stretch"
>
<TelerikGW:RadGridView.Columns>
<TelerikGW:GridViewDataColumn Width="*" MinWidth="50">
<TelerikGW:GridViewDataColumn.Header>
<Label Content="Found" />
</TelerikGW:GridViewDataColumn.Header>
<TelerikGW:GridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Orientation="Horizontal"
>
<StackPanel.InputBindings>
<MouseBinding Command="{Binding Path=ResultClick}" MouseAction="LeftDoubleClick" />
</StackPanel.InputBindings>
<Image Height="20"
MaxWidth="100"
Margin="0"
Source="{Binding ClassIcon.ContentBytes}"
Stretch="Uniform" />
<WV:TextHighLighter Margin="10"
ToolTip="{Binding ResultItem.MatchTerm}"
Padding="0"
Text="{Binding Path=ResultItem.MatchTerm}"
TextToHighLight="{Binding DataContext.SearchedTerm, RelativeSource={RelativeSource AncestorType=WV:GlobalSearch}}" />
</StackPanel>
</DataTemplate>
</TelerikGW:GridViewColumn.CellTemplate>
</TelerikGW:GridViewDataColumn>
</TelerikGW:RadGridView.Columns>
</TelerikGW:RadGridView>


At runtime, on double cicking it throws the following exception.

[System.InvalidCastException] = {"Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'."}
 
Message = "Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'."
 
Source = "Telerik.Windows.Controls.GridView"
 
StackTrace = "   at Telerik.Windows.Controls.GridView.GridViewRow.ShouldHandleMouseDoubleClick(MouseButtonEventArgs e)\r\n   at Telerik.Windows.Controls.GridView.GridViewRow.OnMouseDoubleClick(MouseButtonEventArgs e)\r\n   at System.Windows.Controls.Control.HandleDouble...

It works if the MouseAction is set to LeftClick, which I don't want to use.

It had worked with 2011-Q3.

Can someone get back with a solution for this please?

Best Regards,

Gajan





4 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 12 Mar 2012, 12:13 PM
Hello,

 This is already fixed and you can get our latest internal build from your account. 

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Gajan
Top achievements
Rank 1
answered on 13 Mar 2012, 04:03 PM
Thanks, the fix resolved the issue.

Best Regards,

Gajan
0
Terrance
Top achievements
Rank 1
answered on 14 May 2012, 04:00 PM
Good  Day, We are still having a similar error with the assembly version
Telerik.Windows.Controls.GridView, Version=2012.1.215.40, Culture=neutral
Is there a later version or a patch with this fix that we can use or possibly a work around? If not then what should we do?
0
Vlad
Telerik team
answered on 15 May 2012, 06:54 AM
Hi,

 Your version is Q1 2012. You can upgrade to our official Q1 2012 SP1 or our latest internal build. 

Kind regards,
Vlad
the Telerik team

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

Tags
GridView
Asked by
Gajan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Gajan
Top achievements
Rank 1
Terrance
Top achievements
Rank 1
Share this question
or