0
在XAML:DataGrid列定義Silverlight的問題
錯誤1型「DataGridTextColumn」 不支持直接
我想每行中一個DataGridView添加一列按鈕 在DataGrid
看:
<UserControl x:Class="Paradigma.Silverlight.DiccionarioDatos.UserControlAdminEmpleados"
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:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
xmlns:ig="http://schemas.infragistics.com/xaml"
mc:Ignorable="d"
d:DesignHeight="469" d:DesignWidth="641" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
<Grid x:Name="LayoutRoot" Background="White">
<ListBox Height="145" HorizontalAlignment="Left" Margin="12,32,0,0" Name="lbEmpleado" VerticalAlignment="Top" Width="267" />
<ListBox Height="145" HorizontalAlignment="Right" Margin="0,32,100,0" Name="lbRoles" VerticalAlignment="Top" Width="256" />
<Button Content="Agregar" Margin="0,32,11,0" Name="butAgregar" Click="butAgregar_Click" HorizontalAlignment="Right" Width="83" Height="145" VerticalAlignment="Top" />
<sdk:DataGrid AutoGenerateColumns="False" Height="230" Margin="11,0,11,47" Name="dgRelaciones" VerticalAlignment="Bottom">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Empleado" IsReadOnly="False" Width="Auto" Binding="{Binding Empleado.Nombre}"/>
<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Rol" IsReadOnly="False" Width="Auto" Binding="{Binding Rol.Nombre}"/>
<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Acciones" IsReadOnly="False" Width="Auto" >
<StackPanel />
</sdk:DataGridTextColumn>
</sdk:DataGrid.Columns>
</sdk:DataGrid>
</Grid>
</UserControl>