dev master—detail 主表和明细的具体使用案例
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:NewPwr.Mes.NewProductionImport.Module.Views"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
x:Class="NewPwr.Mes.NewProductionImport.Module.Views.PartDistributeView"
xmlns:converters="clr-namespace:NewPwr.Mes.NewProductionImport.Module.Converters"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
mc:Ignorable="d">
AllowColumnFiltering="True" ShowCheckBoxSelectorColumn="True"
RowIndicatorContentTemplate="{StaticResource RowIndicatorContentTemplate}"/>
主从表数据展开
////// 展开masterdetail主从表展开
///
///
///
private void GridControlMain_Loaded(object sender, RoutedEventArgs e)
{
var gctrl = (GridControl)sender;
for (int i = 0; i < gctrl.VisibleRowCount; i++)
{
gctrl.ExpandMasterRow(gctrl.GetRowHandleByListIndex(i),de);
} }