Ticket T610750
Visible to All Users

How to create and show detail GridControls

created 7 years ago

[DevExpress Support Team: CLONED FROM T610301: GridControl with CheckEdit and InplaceBaseEdit in the same column won't update the InplaceBaseEdit text]
I tried putting a grid inside the grid, however this causes a native crash of .NET that can't be debugged.

XAML
<dxg:GridControl Name="GridControl" ItemsSource="{Binding ItemsTable, Mode=TwoWay}" DockPanel.Dock="Bottom" MaxHeight ="1024" SelectionMode="Cell"> <dxg:GridControl.Columns> <dxg:GridColumn FieldName="Value" AutoFilterCondition="Equals"> <dxg:GridColumn.CellTemplate> <DataTemplate> <dxg:GridControl> <dxg:GridColumn> <dxe:InplaceBaseEdit Name="PART_Editor" IsEnabled="False" Visibility="Visible" /> </dxg:GridColumn> <dxg:GridColumn> <dxe:CheckEdit Name="PART_CheckEdit" IsChecked="{Binding RowData.Row.CheckBox, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Visibility="Visible" DockPanel.Dock="Left" Margin="2,0" IsEnabled="True" VerticalAlignment="Center" /> </dxg:GridColumn> <dxg:GridColumn> <TextBlock Name="DisabledText" Text="{Binding RowData.Row.Text}" Visibility="Visible" DockPanel.Dock="Left" VerticalAlignment="Center" /> </dxg:GridColumn> </dxg:GridControl> <DataTemplate.Triggers> <DataTrigger Binding="{Binding RowData.Row.CheckBox}" Value="True"> <Setter TargetName="PART_Editor" Property="Visibility" Value="Visible" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </dxg:GridColumn.CellTemplate> </dxg:GridColumn> </dxg:GridControl.Columns> </dxg:GridControl>
Comments (3)
Kirill (DevExpress Support) 7 years ago

    Hello,
    Am I right that your final goal is to display detail GridControls for rows in your main GridControl? If so, I suggest that you use our built-in Master-Detail feature described in the following article: Master-Detail Data Representation. Please review this feature and provide us with your results. If your final goal is different or this approach doesn't meet your requirements, please describe them in greater detail.

    Thanks,
    Kirill

    RH RH
    Roland Harrison 7 years ago

      Thank you for that. It turns out we don't need this feature/design anymore so I haven't tried your example but it looks very thorough. If we do add the feature back I will report back here.

      Kirill (DevExpress Support) 7 years ago

        You are welcome!

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.