Completed
Last Updated: 27 Oct 2015 07:26 by ADMIN
ADMIN
Dimitar
Created on: 30 Sep 2015 10:21
Category: GridView
Type: Bug Report
2
FIX. RadGridView - the expander and line links are drawn in a wrong cells when the grid is scrolled horizontally.
To reproduce:
- Crete a self-reference hiearchy and show the grid lines.
- Start the application expand some rows scroll to the bottom and then scroll to the right.
- The issue is easily reproducible with the example from the documentation.

Workaround:
class MyDataCellElement : GridDataCellElement
{
    public MyDataCellElement(GridViewColumn col, GridRowElement row) : base(col, row)
    {
    }

    protected override SizeF ArrangeOverride(SizeF finalSize)
    {
        SelfReferenceCellLayout selfReferenceLayout = this.SelfReferenceLayout;
        if (selfReferenceLayout != null)
        {
            GridDataRowElement dataRowElement = this.RowElement as GridDataRowElement;

            if (dataRowElement != null && this.ColumnInfo.OwnerTemplate != null)
            {
                dataRowElement.SelfReferenceLayout.StackLayoutElement.Visibility = ElementVisibility.Visible;
            }
        }
        else
        {
            GridDataRowElement dataRowElement = this.RowElement as GridDataRowElement;

            if (dataRowElement != null && this.ColumnInfo.OwnerTemplate != null)
            {
                dataRowElement.SelfReferenceLayout.StackLayoutElement.Visibility = ElementVisibility.Collapsed;
            }
        }
        return base.ArrangeOverride(finalSize);
    }
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridDataCellElement);
        }
    }
}
0 comments