TreeListViewRow IsExpandable property

7 posts, 0 answers
  1. Xin
    Xin avatar
    6 posts
    Member since:
    Nov 2010

    Posted 14 Dec 2010 Link to this post

    In the TreeListView RowLoaded event I set row IsExpandable proeprty to be true.
    It work fine the first time I expand the item, and its child row has the IsExpandable sign, but when i collapse it and re-expand it, the IsExpandable sign for the child row disappears.

    Thanks
    Xin

    private void radTreeListViewFixture_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
    {   
     var row = (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow);
     if (row != null)
     {
        if ((e.DataElement as FixtureCategoryViewModel).IsEmpty == true)
        {
              row.IsExpandable = false;
        }
        else
        {
            row.AddHandler(GridViewRow.MouseLeftButtonDownEvent, new MouseButtonEventHandler(radTreeListViewFixture_RowMouseLeftDown), true);
            row.IsExpandedChanged += new RoutedEventHandler(radTreeListViewFixture_RowIsExpandedChanged);
                                 
            row.IsExpandable = true;                           
        }
      }
    }

     

     

     

  2. Xin
    Xin avatar
    6 posts
    Member since:
    Nov 2010

    Posted 14 Dec 2010 Link to this post

    I attached a screen shot showing how it looks like.

    Thanks
    Xin
  3. DevCraft banner
  4. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 16 Dec 2010 Link to this post

    Hi Xin,

    Can you please attach the whole project. I will gladly try to debug the problem over it . I am sure we can think of some solution .

    All the best,
    Pavel Pavlov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  5. Xin
    Xin avatar
    6 posts
    Member since:
    Nov 2010

    Posted 16 Dec 2010 Link to this post

    Thanks for your reply.

    I found a similar issue on the forum "EnableRowVirtualization and IsExpandable" dated back to Aug 6, 2010

    http://www.telerik.com/community/forums/silverlight/treelist/enablerowvirtualization-and-isexpandable.aspx

    Any luck?

    Xin

  6. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 20 Dec 2010 Link to this post

    Hello Xin,

    I am sending you the sample project I used for testing the issue. However, I was not able to reproduce the issue you specified. Please take a look at it and let me know in case of any discrepancies. Feel free to change it in the way you want so that it suits your needs.
    Furthermore, it would be great if you could send us your application so that we could see and test your exact requirements.
     

    Best wishes,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  7. Xin
    Xin avatar
    6 posts
    Member since:
    Nov 2010

    Posted 20 Dec 2010 Link to this post

    Thanks for the sample, but I am not able to run it.
    I have Q2 2010. When I open this project it gives me an error.
    Please find the attached file for the screen shot.

    Regards
    Xin
  8. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 21 Dec 2010 Link to this post

    Hi Xin,

    The sample project uses the binaries form our latest official release Q3 2010 and targets Silverlight 4. Usually, the error you are getting is a result of some discrepancy between the versions of Silverlight. May you try out if all the references you have a for the correct version. Still I am sending you the sample project back with the assemblies form our Q2 2010 Silverlight 4.
     

    Best wishes,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top
DevCraft banner