Completed
Last Updated: 14 Oct 2015 11:14 by ADMIN
ADMIN
George
Created on: 08 Jul 2014 12:50
Category: GridView
Type: Bug Report
0
FIX. RadGridView - adding rows after the grid is loaded and paging is enabled causes a vertical scrollbar to show up
To reproduce:

Setup RadGridView as follows:

this.Grid.MasterTemplate.EnablePaging = true;
this.Grid.Columns.Add("");
this.Grid.Columns.Add("");
this.Grid.Columns.Add("");
this.Grid.Columns.Add("");

On a button click add rows:

private void Button_Clic9k(object sender, EventArgs e)
{
    for (int i = 0; i < 120; i++)
    {
        this.Grid.Rows.AddNew();
    }
}

You will see a vertical scrollbar when it is not needed.

Workaround:

Wrap the loop in a Begin/EndUpdate calls:

private void Button_Clic9k(object sender, EventArgs e)
{
    this.Grid.BeginUpdate();
    for (int i = 0; i < 120; i++)
    {
        this.Grid.Rows.AddNew();
    }

    this.Grid.EndUpdate();
}

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments