Completed
Last Updated: 11 Oct 2018 12:24 by Dimitar
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 05 Oct 2018 12:25
Category: VirtualGrid
Type: Bug Report
1
FIX. RadVirtualGrid - current page index is not updated in the VirtualGridPagingPanelElement when the rows are cleared
To reproduce: use the following code snippet. Navigate to the last page and press the button to clear the rows. You will notice that the current page index remains 10 although no rows are available in the grid

        public RadForm1()
        {
            InitializeComponent();

            this.radVirtualGrid1.RowCount = 1000;
            this.radVirtualGrid1.ColumnCount = 5;
            this.radVirtualGrid1.CellValueNeeded += radVirtualGrid1_CellValueNeeded;

            this.radVirtualGrid1.EnablePaging = true;
        }

        private void radVirtualGrid1_CellValueNeeded(object sender, Telerik.WinControls.UI.VirtualGridCellValueNeededEventArgs e)
        {
            e.Value = "Item" + e.RowIndex + "." + e.ColumnIndex;
        }

        private void radButton1_Click(object sender, EventArgs e)
        {
            this.radVirtualGrid1.RowCount = 0;
            this.radVirtualGrid1.ColumnCount = 5; 
        }

Workaround:  this.radVirtualGrid1.VirtualGridElement.FindDescendant<VirtualGridPagingPanelElement>().PageNumberTextBox.Text = "1";
0 comments