Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8836935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:36:16+00:00 2026-06-14T09:36:16+00:00

I am binding the DataGrid to an ObservableCollection of custom objects. Intermittently I get

  • 0

I am binding the DataGrid to an ObservableCollection of custom objects. Intermittently I get (on maybe 2 or 3 rows) that a button like nubbie object (about maybe 4 pixels wide and the height of the row) appears on the left edge and causes the columns to indent slightly for that row so that they don’t line up. I don’t think there is anything special about those rows because if I rebind the grid to the same objects, the nubbies might not happen at all or might appear on different rows.

I am using some custom styling, and my first column is a DataTemplate, so I have included that below in case anyone can see anything in it that might be causing my issue. I’m kinda stumped at this point…

<DataGrid  Style="{DynamicResource WPFDataGridStyle}" Background="White" BorderBrush="LightGray" FontSize="13"
        CanUserReorderColumns="True" HorizontalGridLinesBrush="#FFEFEFEF" VerticalGridLinesBrush="#FFEFEFEF" HeadersVisibility="Column" 
        AlternatingRowBackground="#FFF4F4F4" CanUserResizeRows="False" SelectionMode="Single" AutoGenerateColumns="False" 
        CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="True" FrozenColumnCount="3"
        ItemsSource="{Binding VM.FilteredSteamJobs,Mode=TwoWay,Source={StaticResource VM}}" 
        SelectedItem="{Binding VM.SelectedJob,Mode=TwoWay,Source={StaticResource VM}}"
        Visibility="{Binding VM.IsScheduleLoaded,Mode=OneWay,Source={StaticResource VM},Converter={StaticResource BoolToVisConv}}"  >
    <DataGrid.Resources>
        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#AAA7CDF0"/>
        <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#AAA7CDF0"/>
        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
        <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black"/>

        <Style x:Key="WPFDataGridStyle" TargetType="{x:Type DataGrid}" BasedOn="{StaticResource {x:Type DataGrid}}">
            <Setter Property="ColumnHeaderStyle" Value="{DynamicResource ColumnHeaderStyle1}"/>
            <Setter Property="CellStyle" Value="{DynamicResource CellStyle1}"/>
        </Style>

        <Style x:Key="ColumnHeaderStyle1" TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
            <Setter Property="Height" Value="25"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFC8E0FF" Offset="1"/>
                        <GradientStop Color="#FFF5FAFF" Offset="0"/>
                        <GradientStop Color="#FFDBEBFF" Offset="0.5"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="BorderThickness" Value="0.5,0"/>
            <Setter Property="BorderBrush" Value="DarkGray"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="FontSize" Value="13" />
        </Style>

        <Style x:Key="CellStyle1" TargetType="{x:Type DataGridCell}">
            <Setter Property="Height" Value="25"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="FontSize" Value="13"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Padding" Value="3,0"/>
        </Style>
    </DataGrid.Resources>

    <DataGrid.Columns>

        <!--Selection Checkbox Column-->
        <DataGridTemplateColumn IsReadOnly="True" CanUserResize="False" CanUserSort="False" Width="Auto">
            <DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Grid>
                        <CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" Margin="3"
                                  IsChecked="{Binding Path=IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                  Visibility="{Binding Status,Converter={StaticResource StatusToSelectVisConv}}">
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="1.2" ScaleY="1.2"/>
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                    </Grid>
                </DataTemplate>
            </DataGridTemplateColumn.CellTemplate>
            <DataGridTemplateColumn.HeaderTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <CheckBox VerticalAlignment="Center" Checked="HeaderSelect_Checked" Unchecked="HeaderSelect_Unchecked">
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="1.3" ScaleY="1.3"/>
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                    </StackPanel>
                </DataTemplate>                 
            </DataGridTemplateColumn.HeaderTemplate>
        </DataGridTemplateColumn>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:36:17+00:00Added an answer on June 14, 2026 at 9:36 am

    I have been struggling with this issue as well, and if i’m not mistaking you have to set RowHeaderWidth="0" on the DataGrid to avoid this “bug”.

    Apparently the row headers are being shown for some random rows, even though HeadersVisibility is set to Column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataGrid that binding an ObservableCollection of self tracking entities Users can
I have a datagrid that's bound to an observablecollection object. The collection may be
Hi I have a Datagrid that is bound to an ObservableCollection of custom AutoCAD
In my wpf app, I have a datagrid as follows <Custom:DataGrid x:Name=dg_nba IsEnabled={Binding Iseditmode}
Using MVVM and EF...I have a datagrid binding to a View Model (using ObservableCollection).
I have a datagrid that is bound to a observableCollection of Employees The user
I have a datagrid with an Observable Collection of a custom object. The selectedItem
I have a DataGrid . Right now it's binding to an ObservableCollection<Foo> in my
I am binding a WPF application DataGrid to an ObservableCollection via the DataGrid's ItemSource.
I have a simple DataGrid which I am binding to a ObservableCollection and its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.