Hello,
I attach the sources to reproduce the issue. I used Q3 2011. I've a grid bound to a list of items that have a property "Name". This name can be wrapped inside the datatemplate of the gridview column. If you scroll down to the bottom of the grid, the last item is not fully visible (please see attached screenshot for details). In some cases the last item is not visible at all, depending on the size of the wrapped text and the width of the column. I've played with different sizes and was able to reproduce the issue.
We have an application in production and this issue is very important for us.
Notes: In the example, to generate test data I've used "nbuilder" that can be obtained from NuGet.
Feedback is appreciated.
Thanks.
I attach the sources to reproduce the issue. I used Q3 2011. I've a grid bound to a list of items that have a property "Name". This name can be wrapped inside the datatemplate of the gridview column. If you scroll down to the bottom of the grid, the last item is not fully visible (please see attached screenshot for details). In some cases the last item is not visible at all, depending on the size of the wrapped text and the width of the column. I've played with different sizes and was able to reproduce the issue.
We have an application in production and this issue is very important for us.
Notes: In the example, to generate test data I've used "nbuilder" that can be obtained from NuGet.
<
Window
x:Class
=
"GridViewBug.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
WindowState
=
"Maximized"
WindowStartupLocation
=
"CenterScreen"
Loaded
=
"Window_Loaded"
>
<
telerik:RadGridView
ItemsSource
=
"{Binding Items}"
Margin
=
"20"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewColumn
Width
=
"300"
Header
=
"Data"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name}"
TextWrapping
=
"Wrap"
/>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Window
>
using
System.Windows;
namespace
GridViewBug
{
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
InitializeComponent();
}
private
void
Window_Loaded(
object
sender, RoutedEventArgs e)
{
DataContext =
new
MainWindowViewModel();
((MainWindowViewModel)DataContext).Test();
}
}
}
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Linq;
using
FizzWare.NBuilder;
using
FizzWare.NBuilder.Generators;
namespace
GridViewBug
{
public
class
Stuff
{
public
string
Name {
get
;
set
; }
}
public
class
MainWindowViewModel : INotifyPropertyChanged
{
private
PropertyChangedEventHandler _propertyChangedEvent;
public
event
PropertyChangedEventHandler PropertyChanged
{
add
{
_propertyChangedEvent += value;
}
remove
{
_propertyChangedEvent -= value;
}
}
protected
virtual
void
NotifyPropertyChanged(
string
name)
{
PropertyChangedEventHandler handler = _propertyChangedEvent;
if
(handler !=
null
)
{
handler(
this
,
new
PropertyChangedEventArgs(name));
}
}
private
List<Stuff> _items;
public
List<Stuff> Items
{
get
{
return
_items; }
set
{
_items = value;
NotifyPropertyChanged(
"Items"
);
}
}
public
void
Test()
{
string
phrase = GetRandom.Phrase(130);
Items = Builder<Stuff>.CreateListOfSize(70).All().With(x => x.Name = phrase).Build().ToList();
}
}
}
Feedback is appreciated.
Thanks.