Welcome to the Xceed Community | Help
Community Search  
More Search Options

Making detail rows only allow insertion of new rows, not edit of existing rows

Sort Posts: Previous Next
  •  12-14-2009, 6:56 PM Post no. 25207

    Computer [co] Making detail rows only allow insertion of new rows, not edit of existing rows

    I have a grid containing master rows and detail rows.  Both the master rows and detail rows headers contain an insertion row.  However, I only wish the master rows to allow existing rows to be edited, not the detail rows.  How do I achieve this?

    I have attached an example project of my current situation where detail rows are still able to be edited.

    Thanks,

    Jason


    Associate, .NET Development
    Morgan Stanley, UK
  •  12-15-2009, 2:54 PM Post no. 25214 in reply to 25207

    Re: Making detail rows only allow insertion of new rows, not edit of existing rows

    Hi Jason,

    You need to make an explicit style on DataRow which sets the ReadOnly property to true, and then apply that style on the ItemContainerStyle of the DetailConfiguration of the details that you do not want the user to modify.

    For example:

       <Style x:Key="ReadOnlyRow" TargetType="{x:Type xcdg:DataRow}">
          <Setter Property="ReadOnly" Value="True" />
       </Style>

       <xcdg:DataGridControl.DetailConfigurations>
          <xcdg:DetailConfiguration RelationName="..." ItemContainerStyle="{StaticResource ReadOnlyRow}" >

     


    Diane Lafontaine
    Technical Support / Technical Support Team Lead
    Xceed Software Inc.
  •  12-16-2009, 4:36 PM Post no. 25237 in reply to 25214

    Re: Making detail rows only allow insertion of new rows, not edit of existing rows

    Thanks.  Works perfectly! :)
    Associate, .NET Development
    Morgan Stanley, UK
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.