I made a simple example:
|
|||||||||||||||||||||||
{ | |||||||||||||||||||||||
ObservableCollection<TestData> m_TestDataCollection = null; | |||||||||||||||||||||||
public Window1() | |||||||||||||||||||||||
{ | |||||||||||||||||||||||
InitializeComponent(); | |||||||||||||||||||||||
InitData(); | |||||||||||||||||||||||
gvTest.ItemsSource = m_TestDataCollection; | |||||||||||||||||||||||
} | |||||||||||||||||||||||
void InitData() | |||||||||||||||||||||||
{ | |||||||||||||||||||||||
m_TestDataCollection = new ObservableCollection<TestData>(TestData.Generate(100)); | |||||||||||||||||||||||
m_TestDataCollection.Add( | |||||||||||||||||||||||
new TestData() | |||||||||||||||||||||||
{ | |||||||||||||||||||||||
SomeStrProperty = "The last row" | |||||||||||||||||||||||
}); | |||||||||||||||||||||||
} | |||||||||||||||||||||||
} |
<Window x:Class="WpfApplication6.Window1" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
Title="Window1" Height="300" Width="500"> |
<Grid> |
<telerik:RadGridView x:Name="gvTest"/> |
</Grid> |
</Window> |
1) Run this code
2) Scroll the grid down using right scrollbar
3) last row (marked "The last row") is half-visible (or invisible at all), despite of right scrollbar is bottom down (if you can't reproduce please set some another value in generate method)
4) Now scroll using mouse wheel. Everything is OK.
PS. I use Q3 without SP1 (will migration to SP1 fix this?)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Threading.Tasks;
using Telerik.Windows.Controls;
namespace My.Controls
{
/// <
summary
>
/// Interaction logic for RadSalesPersonRCS1.xaml
/// </
summary
>
public partial class RadSalesPersonRCS1 : Window
{
public RadSalesPersonRCS1()
{
InitializeComponent();
}
}
}
private void MenuItem_ViewSalesPerson(object sender, RoutedEventArgs e)
{
RadSalesPersonRCS1 salesperson = new RadSalesPersonRCS1();
RadSalesPersonRCS1.ShowDialog();
}
Currently the tree is working properly so that if you highlight a tree item and click the OK button on the view, all is good. However, I need to also allow the user to double click on one of the tree items. This means I already have a command and method, protected override void OkAction(), in my view model with the needed logic. Telerik supplies a property called ItemDoubleClick that is supposed to supply functionality for the tree item double click. But I can't find anything to allow me to do this in the view model. In other words, how do I do the binding? We also have a behavior setup in our project for double clicking that I was told I could use, but I have no experience with behaviors. I'm still a little wet with WPF.
I would appreciate any help or direction anyone can provide.
XAML for NodeTemplate:
<Grid.Resources>
<DataTemplate x:Key="WidgetTemplate">
<StackPanel Orientation="Horizontal">
<Image Source="/Resources/gear1.png" Margin="1" Stretch="None" />
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" Margin="6,0,0,0" />
</StackPanel>
</DataTemplate>
<HierarchicalDataTemplate x:Key="NodeTemplate" ItemsSource = "{Binding Children}" ItemTemplate="{StaticResource WidgetTemplate}">
<TextBlock Text="{Binding Name}"/>
</HierarchicalDataTemplate>
</Grid.Resources>