Multiple controls in CellEditTemplate

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    12 posts
    Member since:
    Sep 2012

    Posted 28 Jan 2013 Link to this post


    I currently have a ToggleButton and a Textblock inside a gridcell. The ToggleButton shows/hides a RowDetailsTemplate. How can I make the ToggleButton AND Textblock both visible within a CellEditTemplate.

    <telerik:GridViewDataColumn DataMemberBinding="{Binding Account}"
                        <ColumnDefinition Width="20" />
                        <ColumnDefinition Width="*" />
                    <ToggleButton IsChecked="{Binding DetailsVisible}" />
                    <TextBlock  Grid.Column="1" Text="{Binding Description}"/>
                <TextBox Text="{Binding Description}" />

    It seems to through an unhandled exception when I wrap both of these controls inside of a Grid within the CellEditTemplate. any ideas?
  2. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 06 Feb 2013 Link to this post


    Here is a piece of working XAML:

    <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" >
                                   <TextBox Text="{Binding ID}"/>
                                   <Button Width="100" Height="20" Content="Button" />

    Additionally  I am attaching a runnable project demonstrating this in action.

    Kind regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top