【问题标题】:Using a DevX LookUpEdit control, with a GridControl, how can I hide column headings?使用 DevX LookUpEdit 控件和 GridControl,如何隐藏列标题?
【发布时间】:2015-03-05 15:21:04
【问题描述】:

我的 Xaml 文件中目前有以下 DevExpress WPF LookUpEdit 控件。对于我的生活,我找不到隐藏内部网格控件上的标题行的方法。我想要一个非常基本的单列树视图控件。如何做到这一点?

            <dxg:LookUpEdit x:Name="hierarchy" 
                    Grid.Column="3" 
                    Grid.Row="1" 
                    HorizontalAlignment="Left" 
                    Height="22"
                    Width="120" 
                    Margin="0,2,0,3" 
                    VerticalAlignment="Center" 
                    FilterCondition="Contains" 
                    ImmediatePopup="True" 
                    ValueMember="nodeName" 
                    DisplayMember="description" 
                    EditValue="{Binding nodeName}"
                    ItemsSource="{Binding Source={StaticResource nodesSrc}}"
                    AutoPopulateColumns="False">
                <dxg:LookUpEdit.PopupContentTemplate>
                    <ControlTemplate>
                        <dxg:GridControl >
                            <dxg:GridControl.Columns>
                                <dxg:GridColumn FieldName="description" />
                            </dxg:GridControl.Columns>
                            <dxg:GridControl.View>
                                <dxg:TreeListView 
                                    AutoWidth="True"
                                    KeyFieldName="id"
                                    ParentFieldName="parentID"
                                    TreeDerivationMode="Selfreference">
                                </dxg:TreeListView>
                            </dxg:GridControl.View>
                        </dxg:GridControl>
                    </ControlTemplate>
                </dxg:LookUpEdit.PopupContentTemplate>
            </dxg:LookUpEdit>

【问题讨论】:

  • &lt;dxg:TreeListView ShowColumnHeaders="False"/&gt; 或类似的东西。
  • 感谢 HighCore。这就是答案。我是 WPF 和 DevX 的新手……要搜索的属性太多了……

标签: wpf xaml devexpress


【解决方案1】:

请查看 Column Header Panel 帮助文章 - 您可以通过 TreeListView.ShowColumnHeaders 属性控制此面板的可见性。

附:此外,我建议您使用描述您在屏幕上看到的控制元素的Visual Elements 文档部分。本节的每个子主题都包含一个屏幕截图,概述了所描述的元素和元素用途的简要概述。此外,每个主题都包含一个设置列表,用于指定元素的可见性、内容和外观。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-07
    • 1970-01-01
    • 1970-01-01
    • 2016-06-01
    • 1970-01-01
    • 2012-02-17
    • 2023-03-28
    • 2019-06-10
    相关资源
    最近更新 更多