This is a migrated thread and some comments may be shown as answers.

Grid Row Styling

1 Answer 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 15 Jul 2014, 05:32 PM
I need to alter the default validation error styles in the RadGridView.  Errors are generated via INotifyDataErrorInfo

One of the main changes is to remove the "reddish" background that is shown on the row when an error exists in one of the columns.

I have been trying to follow the instructions for styling a row here: http://www.telerik.com/help/wpf/gridview-styling-a-row.html

The instructions indicate one should be able to go to Object -> Edit Additional Styles -> Edit Row Style -> Edit a copy...

However, the only option I have is "Create Empty..." so am unsure as to what the original style looks like so it is difficult to alter.  The instructions indicate I should be able to "Edit a copy..." which would give me the style properties I need.

Is there something I'm missing?

Here is a quick example of the XAML being used:

<Window x:Class="TelerikGridTest.MainWindow"
        xmlns:telerikGridTest="clr-namespace:TelerikGridTest"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525" d:DataContext="{d:DesignInstance telerikGridTest:ViewModel}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Transparent;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView ItemsSource="{Binding Rows}" ActionOnLostFocus="None" GroupRenderMode="Flat" AutoGenerateColumns="False" CanUserInsertRows="True" NewRowPosition="Bottom" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Column One" DataMemberBinding="{Binding ColumnOne, UpdateSourceTrigger=PropertyChanged}" />
                <telerik:GridViewDataColumn Header="Column Two" DataMemberBinding="{Binding ColumnTwo, UpdateSourceTrigger=PropertyChanged}"/>
                <telerik:GridViewDataColumn Header="Column Three" DataMemberBinding="{Binding ColumnThree, UpdateSourceTrigger=PropertyChanged}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 17 Jul 2014, 04:36 PM
Hi,

Actually, you can manually extract the template for the GridViewRow that is available with the installation files of UI for WPF. You can find it together with all the other templates used for the GridView inside "Telerik.Windows.Controls.GridView.xaml" file browsing to "InstallationFolder\UI for WPF Q2 2014\Themes.Implicit\WPF40\OfficeBlack(or Windows7/ Windows8 )\Themes" folder.


Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Michael
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or