IsExpandable for GridViewToggleRowDetailsColumn

2 posts, 0 answers
  1. Avi
    Avi avatar
    25 posts
    Member since:
    Oct 2010

    Posted 21 Dec 2011 Link to this post


    I have a RadGridView and I don’t want to enable the Expand button (+) to expend (to be open) if the "IsDivided" property value =false. 
    I added a RowLoaded Event " RefundsGrid_RowLoaded" where I set the IsExpandable property of the row to false but it's not disabling the "+" to be expend (open) .

    I read this blog:

    But I'm not sure if it's relevant in my case.

    On I put on "IsVisible" value false it work OK and don't show the (+). But when I Binding in to property IsDivided. it's not working
    <telerik:GridViewToggleRowDetailsColumn Width="10" IsResizable="False" IsVisible="{Binding IsDivided}" />

    public bool IsDivided
            return (DivideCode.Equals('k'));

    and the second option I try is this.

    The code is as follows:
     What am I missing?  

        <DataTemplate x:Key="RefundProvisionsGridCell">
    <telerik:RadGridView Name="RefundsGrid" RowLoaded="RefundsGrid_RowLoaded" ItemsSource="{Binding Refunds}" RowDetailsTemplate="{StaticResource RefundProvisionsGridCell}">
            <telerik:GridViewToggleRowDetailsColumn Width="10" IsResizable="False" />
    private void RefundsGrid_RowLoaded(object sender, RowLoadedEventArgs e)
        if (e.DataElement != null)
            GridViewRow row = e.Row as GridViewRow;
            Refund refund = (Refund)e.DataElement;
            if (row != null && refund != null)
                row.IsExpandable = refund.IsDivided; //try this one with no help
                row.IsExpanded = refund.IsDivided;  //try this one with no help
                row.DetailsVisibility = refund.IsDivided ? Visibility.Visible : Visibility.Collapsed; //try this one with no help
  2. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 29 Nov 2012 Link to this post

    I know this is old, but is there no solution to this?

    I'm having a similar issue, I can't seem to bind GridViewToggleRowDetailsColumn IsVisible ... well I can bind it, but it doesn't seem to do anything ... no binding errors being generated and the binding value is set in my VM.

    I looked at the online sample and the code seems to be completely unrelated to the specific example??

Back to Top