vertical scroll reorders rows

Aug 20, 2009 at 9:26 AM
Edited Aug 20, 2009 at 9:41 AM

i have grid with 10 rows, 4 actualy visible, rows are generated from ItemsSource

AWpfControls::AGridControl::UpdateData() Line 2060 C++
AWpfControls::AGridControl::CreateColumns() Line 1412 C++
AWpfControls::AGridControl::GridControl_Loaded(System::Object^ sender = 0x15d1ef6c, System::Windows::RoutedEventArgs^ e = 0x15f3d120) Line 1610 C++

where my UdateData mentioned in call stack contains:


(m_data == ItemsSource,   AGridControlData : System::Collections::ObjectModel::ObservableCollection<AllplanGridControlDataItem^>)

all looks ok untill you will not play with vertical scroll bar, what somehow (usualy) moves line/row 1 (first one == [0]) to 10 and calls


to recreate 1st line (!?) = finaly i have two lines connected to the same row data

(or sometimes line 1 and 10 are ok and 2nd becomes empty)

when i extend my grid's UpdateData to

this->ItemsSource = nullptr;


this->ItemsSource = m_data;


already GenerateElement is not called during scoll

but just with scrolling (completely down (still ok) and bit up) line 1 appears at position 10 and line 1 becomes empty

any ideas?

other settings: 

this->AutoGenerateColumns = false;

this->CanUserAddRows = false;

this->CanUserDeleteRows = false;

this->CanUserSortColumns = false;

this->CanUserReorderColumns = false;

this->IsReadOnly = true;

this->SelectionMode = Microsoft::Windows::Controls::DataGridSelectionMode::Single;

this->RowHeaderWidth = 0;

Aug 20, 2009 at 10:03 AM

this->EnableRowVirtualization = false;

fixed it

(started search for sideeffects of fix)

Sep 10, 2009 at 10:32 AM


I also have similar problem when playing vertical scrollbar. Everything work fines if switch off the EnableRowVirtualization. Anyone can help?