Giter VIP home page Giter VIP logo

how-to-show-tooltip-for-stacked-headers-in-wpf-data-grid's Introduction

How to show tooltip for Stacked Headers in WPF DataGrid (SfDataGrid)?

About the sample

This example illustrates how to show tooltip for Stacked Headers in WPF DataGrid (SfDataGrid).

WPF DataGrid (SfDataGrid) doesn’t have direct support to show tooltip for the stacked header cell. However you can enable tooltip for the stacked header cells by including Style with TargetType as GridStackedHeaderCellControl.

<Window.Resources>
    <Style TargetType="syncfusion:GridStackedHeaderCellControl">
        <Setter Property="ToolTip">
            <Setter.Value>
                <TextBlock Text="{Binding HeaderText}" ToolTipService.IsEnabled="True" 
                            ToolTipService.ShowOnDisabled="True"/>
            </Setter.Value>
        </Setter>
        <Setter Property="ToolTipService.IsEnabled" Value="True" />
        <Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
    </Style>
</Window.Resources>

<Grid>
    <syncfusion:SfDataGrid Name="dataGrid"
                           AllowFiltering="True"
                           ItemsSource="{Binding OrdersListDetails}">
        <syncfusion:SfDataGrid.StackedHeaderRows>
            <syncfusion:StackedHeaderRow>
                <syncfusion:StackedHeaderRow.StackedColumns>
                    <syncfusion:StackedColumn ChildColumns="OrderID,ProductName,Quantity" HeaderText="Order Details" MappingName="OrderDetails"/>
                    <syncfusion:StackedColumn ChildColumns="CustomerID,ContactNumber" HeaderText="Customer Details" MappingName="CustomerDetails"/>
                </syncfusion:StackedHeaderRow.StackedColumns>
            </syncfusion:StackedHeaderRow>
        </syncfusion:SfDataGrid.StackedHeaderRows>
    </syncfusion:SfDataGrid>

ToolTip for Stacked Headers

KB article - How to show tooltip for Stacked Headers in WPF DataGrid (SfDataGrid)?

Requirements to run the demo

Visual Studio 2015 and above versions.

how-to-show-tooltip-for-stacked-headers-in-wpf-data-grid's People

Contributors

farjanaparveen avatar sarubala20 avatar 9629976110 avatar mohanramanbukkarasu avatar vinothkumar-ganesan avatar

Watchers

James Cloos avatar Vijay Anand avatar Vijayakumar Srinivasan avatar harivenkateshe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.