Completed
Last Updated: 26 Nov 2015 11:48 by ADMIN
ADMIN
Jack
Created on: 31 Oct 2012 09:37
Category: GridView
Type: Bug Report
0
FIX. RadGridView - scrolls to right when clicking on a pinned checkbox column in a child view
1. Create a new project with RadGridView and setup 2 level hierarchy.
2. Add a checkbox column at the second level and set its pinned state to Left.
3. Run the application.
4. Expand the first row and click on the checkbox. Be sure that RadGridView contains enough columns in its child view to show horizontal scrollbar.

Workaround:  create a custom view definition
public class CustomTableViewDefinition : TableViewDefinition
{
    public override IRowView CreateViewUIElement(GridViewInfo viewInfo)
    {
        CustomTableElement table = new CustomTableElement();
        return table;
    }
}
 
public class CustomTableElement : GridTableElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridTableElement);
        }
    }
 
    public override bool EnsureCellVisible(GridViewRowInfo rowInfo, GridViewColumn column)
    {
        if (column.IsPinned)
        {
            return true;
        }
        return base.EnsureCellVisible(rowInfo, column);
    }
}

Set the view definition to the child template by using the ViewDefinition property

this.gridViewDemoData.Templates[0].ViewDefinition = new CustomTableViewDefinition();
0 comments