Current filter:
                                You should refresh the page.
                                Support Center

                                How to provide any text for the RowIndicator

                                0

                                To provide any text for the RowIndicator, override the DataTemplate for IconPresenterTemplate resource key. If it's necessary to assign the data source row index, create an unbound column, and bind an element in the template to this unbound column.

                                • System 3 05.29.2012

                                  This no longer works in 2010.2 as the schema location has changed.

                                  You need to add
                                  xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"

                                  and replace any dxg:RowIndicatorThemeKey in the xaml with dxt:RowIndicatorThemeKey

                                  Also add IsThemeIndependant=True if you aren't using their themes.
                                  <DataTemplate x:Key="{dxt:RowIndicatorThemeKey ResourceKey=IconPresenterTemplate, IsThemeIndependent=true}">

                                You must  log in  or  register  to leave comments
                                Select file
                                • Window1.xaml
                                • Window1.xaml.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2012 vol 1.4 - v2013 vol 1.4
                                • v2011 vol 1.4 - v2011 vol 2.14
                                • v2009 vol 3.5 - v2009 vol 3.7
                                <Window x:Class="Q266716RowIndicator.Window1"
                                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                                    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
                                    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                                        xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
                                    Title="Window1" Height="300" Width="300">
                                    <dxg:GridControl x:Name="gridControl" CustomUnboundColumnData="GridControl_CustomUnboundColumnData" dxc:ThemeManager.ThemeName="Azure">
                                        <dxg:GridControl.Resources>
                                            <DataTemplate x:Key="{dxgt:RowIndicatorThemeKey ResourceKey=IconPresenterTemplate}">
                                                <StackPanel x:Name="root" Orientation="Horizontal">
                                                    <TextBlock Text="{Binding Path=DataContext.RowNumber}" Margin="2"/>
                                                    <ContentPresenter x:Name="iconPresenter" Content="{x:Null}"/>
                                                </StackPanel>
                                                <DataTemplate.Triggers>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="Focused">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=FocusedIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="Changed">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=ChangedIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="NewItemRow">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=NewItemRowIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="Editing">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=EditingIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="Error">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=ErrorIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="FocusedError">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=FocusedErrorIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=IndicatorState}" Value="AutoFilterRow">
                                                        <Setter Property="ContentTemplate" Value="{DynamicResource {dxgt:RowIndicatorThemeKey ResourceKey=AutoFilterRowIconTemplate}}" TargetName="iconPresenter"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Path=(dxe:BaseEdit.HasValidationError)}" Value="True">
                                                        <Setter Property="ToolTip" TargetName="root">
                                                            <Setter.Value>
                                                                <DockPanel>
                                                                    <dxe:ErrorControl Content="{Binding Path=(dxe:BaseEdit.ValidationError)}"/>
                                                                    <ContentPresenter VerticalAlignment="Center" Content="{Binding Path=(dxe:BaseEdit.ValidationError).ErrorContent}" />
                                                                </DockPanel>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </DataTrigger>
                                                </DataTemplate.Triggers>
                                            </DataTemplate>
                                        </dxg:GridControl.Resources>
                                        <dxg:GridControl.Columns>
                                            <dxg:GridColumn FieldName="Text"/>
                                            <dxg:GridColumn FieldName="Number"/>
                                            <dxg:GridColumn FieldName="RowNumber" UnboundType="Integer" Visible="False" ShowInColumnChooser="False" AllowColumnFiltering="False"/>
                                        </dxg:GridControl.Columns>
                                        <dxg:GridControl.View>
                                            <dxg:TableView IndicatorWidth="30"/>
                                        </dxg:GridControl.View>
                                    </dxg:GridControl>
                                </Window>

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners