Declined
Last Updated: 27 Sep 2016 07:28 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 16 Sep 2016 12:10
Category: GridView
Type: Feature Request
1
ADD. RadGridView - add option to place the system rows at the bottom of the grid not at the bottom of the scrollable rows
Please refer to the attached screenshot.

Workaround:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();
    dt.Columns.Add("Id");
    dt.Columns.Add("Name");
    for (int i = 0; i < 5; i++)
    {
        dt.Rows.Add(i, "Item" + i);
    }

    this.radGridView1.DataSource = dt;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

    this.radGridView1.AllowSearchRow = true;
    this.radGridView1.SearchRowPosition = Telerik.WinControls.UI.SystemRowPosition.Bottom;

    this.radGridView1.ViewDefinition = new CustomTableViewDefition();
}

public class CustomTableViewDefition : TableViewDefinition
{
    public override IRowView CreateViewUIElement(GridViewInfo viewInfo)
    {
        return new CustomTableElement();
    }
}

public class CustomTableElement : GridTableElement
{
    protected override RowsContainerElement CreateViewElement()
    {
        return new CustomRowsContainerElement();
    }
}

public class CustomRowsContainerElement : RowsContainerElement
{
    protected override SizeF ArrangeOverride(SizeF finalSize)
    {
        float y = 0;

        this.TopPinnedRows.Arrange(new RectangleF(0, y, finalSize.Width, this.TopPinnedRows.DesiredSize.Height));
        y += this.TopPinnedRows.DesiredSize.Height + ElementSpacing;

        this.ScrollableRows.Arrange(new RectangleF(0, y, finalSize.Width, this.ScrollableRows.DesiredSize.Height));
        y += this.ScrollableRows.DesiredSize.Height + ElementSpacing;

        this.BottomPinnedRows.Arrange(new RectangleF(0, finalSize.Height - this.BottomPinnedRows.DesiredSize.Height,
            finalSize.Width, this.BottomPinnedRows.DesiredSize.Height));

        return finalSize;
    }
}
Attached Files:
1 comment
ADMIN
Ralitsa
Posted on: 27 Sep 2016 07:28
The feature request is duplicated with another item and both are merged into ADD. RadGridView - allow pinned Items position modification in order to be able to always show the pinned summary row, instead of being show as the last row in the grid. The item can be found on the following page: http://feedback.telerik.com/Project/154/Feedback/Details/110991-add-radgridview-allow-pinned-items-position-modification-in-order-to-be-able-t