更改样式头后无法拖放数据网格列 [英] Cannot drag and drop column of datagrid after changed style head

查看:47
本文介绍了更改样式头后无法拖放数据网格列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我改变标题样式后无法拖放数据网格列


这是新风格标题列

< sdk:DataGridTemplateColumn.HeaderStyle> 
< Style TargetType =" sdk:DataGridColumnHeader">
< Setter Property =" Horizo​​ntalAlignment"
Value =" Stretch" />
< Setter Property =" Horizo​​ntalContentAlignment"
Value =" Stretch" />
< Setter Property =" Margin"
Value =" 0,0,0,0" />
< Setter Property =" Padding"
Value =" 3" />
< Setter Property =" Background"
Value =" Transparent" />
< Setter Property =" ContentTemplate">
< Setter.Value>
< DataTemplate>
< Grid Margin =" 0,0,-12,0"的Horizo​​ntalAlignment = QUOT;拉伸">
< Grid.RowDefinitions>
< RowDefinition />
< RowDefinition />
< /Grid.RowDefinitions>
< ComboBox x:Name =" FilterNumber" Grid.Row = QUOT; 0"
身高="24"的Horizo​​ntalAlignment = QUOT;拉伸"余量= QUOT; 2英寸/>
< Button Content =" FistName" X:名称= QUOT; BtnSort"
Horizo​​ntalAlignment =" Stretch"
Grid.Row =" 1" />

< / Grid>
< / DataTemplate>
< /Setter.Value>
< / Setter>
< / Style>
< / sdk:DataGridTemplateColumn.HeaderStyle>

 你能帮助我吗?


谢谢,


MsAllSunday


解决方案

为什么你发布样式代码,我认为错误的位置在你的拖放列代码中,


参见:


http://msdn.microsoft.com/en-us/library/ms996459.aspx


Hi all,

I cannot drag and drop column of datagrid after I changed style for header

This is new style of header column

  <sdk:DataGridTemplateColumn.HeaderStyle>
                            <Style TargetType="sdk:DataGridColumnHeader">
                                <Setter Property="HorizontalAlignment"
                                        Value="Stretch" />
                                <Setter Property="HorizontalContentAlignment"
                                        Value="Stretch" />
                                <Setter Property="Margin"
                                        Value="0,0,0,0" />
                                <Setter Property="Padding"
                                        Value="3" />
                                <Setter Property="Background"
                                        Value="Transparent" />
                                <Setter Property="ContentTemplate">
                                    <Setter.Value>
                                        <DataTemplate>
                                            <Grid Margin="0,0,-12,0" HorizontalAlignment="Stretch">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition />
                                                </Grid.RowDefinitions>
                                                <ComboBox x:Name="FilterNumber" Grid.Row="0"
                                                                        Height="24" HorizontalAlignment="Stretch" Margin="2"/>
                                                <Button Content="FistName" x:Name="BtnSort"
                                                        HorizontalAlignment="Stretch"
                                                        Grid.Row="1" />
                                             
                                            </Grid>
                                        </DataTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </sdk:DataGridTemplateColumn.HeaderStyle>

 Can you help me?

Thanks,

MsAllSunday

解决方案

why you post style code, i think the wrong place was in your drag and drop column code,

see:

http://msdn.microsoft.com/en-us/library/ms996459.aspx


这篇关于更改样式头后无法拖放数据网格列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆