Question: When I try to run the following bit of code, I get the error `TypeError: object of type 'NoneType' has no len()` (referring to the variable `stringConverted`). I've tested different values and it works for the ones I've tested. I was thinking that the best way to debug this is to figure out what value of `i` causes a 'NoneType'. So I tried to set a conditional breakpoint where `stringConverted = 'NoneType'` so that when I run it, the program should stop when this condition is true. But when I try to run it after setting the conditional break point, it just runs all the way through producing the same error. what am I doing wrong here? Is the way I formatted my conditional breakpoint statement correct?

```
def main():
    totalChars = 0
    for i in range(1,500):
        stringConverted = stringConvert(i)
        totalChars = totalChars + len(stringConverted)
    print totalChars

```

Answer: 
The Visual Tree looks something like this

* DataGridRow
	+ Border
		- DataGridCellsPresenter

When you change the `BorderThickness` of the `Border` you could compensate this by adding negative `Margin.Left` to the `DataGridCellsPresenter` at the same time. Not the prettiest solution but it works

```
<DataGrid ...>
    <DataGrid.Resources>
        <Style TargetType="DataGridCellsPresenter">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsDirty}" Value="true">
                    <Setter Property="Margin" Value="-1,0,0,0" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </DataGrid.Resources>
    <DataGrid.RowStyle>
        <Style TargetType="DataGridRow">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsDirty}" Value="true">
                    <Setter Property="BorderBrush" Value="Red" />
                    <Setter Property="BorderThickness" Value="1" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </DataGrid.RowStyle>
    <!--...-->
</DataGrid>

```
One way could be to apply border to each row rather than the dirty one but set the border to transparent and set the border to red for the row which is actually dirty

Something like

```
<Style TargetType="DataGridRow">
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="1" />
    <Style.Triggers>
        <DataTrigger Binding="{Binding IsDirty}" Value="true">
            <Setter Property="BorderBrush" Value="Red" />
        </DataTrigger>
    </Style.Triggers>
</Style>

```