Data Poulation problem while Scrolling... virtualization is on

4 posts, 0 answers
  1. Sharada
    Sharada avatar
    43 posts
    Member since:
    Mar 2009

    Posted 22 Dec 2010 Link to this post

    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.

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Dec 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Sharada
    Sharada avatar
    43 posts
    Member since:
    Mar 2009

    Posted 22 Dec 2010 Link to this post

    Thanks a lot... It is working :)

  5. Sharada
    Sharada avatar
    43 posts
    Member since:
    Mar 2009

    Posted 30 Dec 2010 Link to this post

    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.



     
Back to Top