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

Data Poulation problem while Scrolling... virtualization is on

3 Answers 99 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Sharada
Top achievements
Rank 1
Sharada asked on 22 Dec 2010, 07:41 AM
Hi

 I am using TreeListView. 
 I am adding columns dynamically at runtime

GridViewDataColumn

 

 

column;

 

 

 

for (int icnt = 1; icnt < ts.Days; icnt++)

 

{

column =

 

new GridViewDataColumn();

 

column.UniqueName =

 

"key" + icnt.ToString();

 

column.IsReadOnly =

 

false;

 

RadTreeListView1.Columns.Add(column);

}


I am populating the cell data in RadTreeListView1_RowLoaded event.

 

var

 

 

row = e.Row as TreeListViewRow;

 

 

 

foreach (GridViewCell cell in row.Cells)

 

{

 

 

if (cell.IsLoaded)

 

{

 

 

DateTime dates;

 

 

 

if (DateTime.TryParse(cell.Column.Header.ToString(), out dates))

 

{

 

 

string filter = "dates = '#" + dates.ToShortDateString().ToString() + "#'";

 

 

 

DataRow[] dr = lobjdt.Select(filter);

 

 

 

if (dr != null && dr.Length > 0)

 

{

cell.Content = dr[0][

 

"hours"].ToString();

 

}

}

}

}

I am facing one problem here.
Data in dynamic columns will populate only when columns are visible , data wont get populate if columns are not
visible.

I guess there is a problem with virtulisation while horizontal scrolling..

Please suggest.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Dec 2010, 08:02 AM
Hello,

 RowLoaded event will not be raised when scrolling horizontally. If you want to use such approach you can turn off horizontal virtualization - EnableColumnVirtualization="False".

Kind regards,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Sharada
Top achievements
Rank 1
answered on 22 Dec 2010, 09:27 AM
Thanks a lot... It is working :)

0
Sharada
Top achievements
Rank 1
answered on 30 Dec 2010, 02:10 PM
Hi Telerik Team,

 Thanks for your previous reply.

 I am facing problem while srcolling with large data.

 For Columns making  EnableColumnVirtualization="False" ok but for Rows I want to make  EnableRowVirtualization="True".

 Scrolling is working fine while scrolling down by expanding Rows but when I want to scroll up , window gets hang and all Rows will collapse.

 Please suggest if I am missing anything here.



 
Tags
TreeListView
Asked by
Sharada
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Sharada
Top achievements
Rank 1
Share this question
or