Hi,
When I am using a custom column and am scrolling in the treelistview the data seems to move around.
In the screenshot the data that is zero should not be zero. but there are columns that are zero. If I scroll around allot all columns will end up having the same number.
I am using version: 2013.1.311.40
here is my custom column code
This only a problem when I scroll. Can you please advice.
Best regards
Kristján
When I am using a custom column and am scrolling in the treelistview the data seems to move around.
In the screenshot the data that is zero should not be zero. but there are columns that are zero. If I scroll around allot all columns will end up having the same number.
I am using version: 2013.1.311.40
here is my custom column code
public
override
FrameworkElement CreateCellElement(GridViewCell cell,
object
dataItem)
{
Grid cellGrid = cell.Content
as
Grid;
TextBlock primaryText =
new
TextBlock(){ TextAlignment = System.Windows.TextAlignment.Right };
TextBlock compareText =
new
TextBlock() { TextAlignment = System.Windows.TextAlignment.Right, Foreground =
new
SolidColorBrush(Color.FromRgb(100, 100, 100))};
if
(
string
.IsNullOrEmpty(
this
.DataMemberBinding.StringFormat))
{
this
.ComparedPlanBinding.StringFormat =
this
.DataFormatString;
this
.DataMemberBinding.StringFormat =
this
.DataFormatString;
}
primaryText.SetBinding(TextBlock.TextProperty,
this
.DataMemberBinding);
compareText.SetBinding(TextBlock.TextProperty, ComparedPlanBinding);
if
(cellGrid ==
null
)
{
cellGrid =
new
Grid();
cellGrid.ColumnDefinitions.Add(
new
ColumnDefinition());
cellGrid.ColumnDefinitions.Add(
new
ColumnDefinition() { Width =
new
GridLength(20)});
cellGrid.ColumnDefinitions.Add(
new
ColumnDefinition());
cellGrid.RowDefinitions.Add(
new
RowDefinition());
cellGrid.Children.Add(primaryText);
Grid.SetColumn(primaryText, 0);
Grid.SetRow(primaryText, 0);
cellGrid.Children.Add(compareText);
Grid.SetColumn(compareText, 2);
Grid.SetRow(compareText, 0);
}
return
cellGrid;
}
This only a problem when I scroll. Can you please advice.
Best regards
Kristján