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

TreeListViewRow IsExpandable property

6 Answers 372 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Xin
Top achievements
Rank 1
Xin asked on 14 Dec 2010, 07:16 PM
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;                           
    }
  }
}

 

 

 

6 Answers, 1 is accepted

Sort by
0
Xin
Top achievements
Rank 1
answered on 15 Dec 2010, 05:01 AM
I attached a screen shot showing how it looks like.

Thanks
Xin
0
Pavel Pavlov
Telerik team
answered on 16 Dec 2010, 04:03 PM
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
0
Xin
Top achievements
Rank 1
answered on 16 Dec 2010, 04:39 PM

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

0
Maya
Telerik team
answered on 20 Dec 2010, 06:21 PM
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
0
Xin
Top achievements
Rank 1
answered on 20 Dec 2010, 07:49 PM
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
0
Maya
Telerik team
answered on 21 Dec 2010, 08:47 AM
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
Tags
TreeListView
Asked by
Xin
Top achievements
Rank 1
Answers by
Xin
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Maya
Telerik team
Share this question
or