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

Sometimes GridViewVirtualizingPanel Items are messed up

3 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Valdo
Top achievements
Rank 1
Valdo asked on 28 Feb 2011, 04:42 PM
In certain conditions, my GridView becomes like this (see attachment). It happens when retrieving data from server and an error occurs. It's hard to reproduce or make a sample project, so any ideas on why this is happening would be appreciated.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Mar 2011, 08:25 AM
Hello,

 Can you post more info about the grid settings, binding and version? Do you have also any custom styles? 

Best wishes,
Vlad
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Valdo
Top achievements
Rank 1
answered on 02 Mar 2011, 09:13 AM

Thanks for replying.

I'm using styles only to change color scheme. And the settings are simple:

<DataGrid:RadGridView ItemsSource="{Binding Items}"
AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed"
ShowGroupPanel="False" ShowGroupFooters="False"
BorderBrush="#FFE2E2E2" BorderThickness="1,0,1,1"
DragDrop:RadDragAndDropManager.AllowDrag="True"
DragDrop:RadDragAndDropManager.AllowDrop="True"
CanUserDeleteRows="false" EditTriggers="None"
  
  <DataGrid:RadGridView.Columns> 
    <Telerik:GridViewDataColumn 
         DataMemberBinding="{Binding Data1}" Header="Header 1"/>
    <Telerik:GridViewDataColumn 
         DataMemberBinding="{Binding Data2}" Header="Header 2"/>
    <Telerik:GridViewDataColumn 
         DataMemberBinding="{Binding Data3}" Header="Header 3"/>
  </DataGrid:RadGridView.Columns>
</DataGrid:RadGridView>

0
Valdo
Top achievements
Rank 1
answered on 26 May 2011, 09:16 AM
UPD: It seems to me that the problem is in the PrepareContainerForItemOverride method. Sometimes it sets VerticalContentAlignment to Center instead of Stretch. And this only occurs, when adding items to GridView which is not visible on screen (on other tab for example). Any ideas why?
Tags
GridView
Asked by
Valdo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Valdo
Top achievements
Rank 1
Share this question
or