Completed
Last Updated: 14 Apr 2022 08:26 by ADMIN
Release R2 2022
James
Created on: 24 Mar 2022 07:00
Category: GridView
Type: Bug Report
0
RadGridview: Expanding the top group row when paging is enabled jumps to a previous page

Steps to reproduce:

1.Run the attached sample project.

2.Group by the ProductID column

3.Select Page 4

4. Expand the top group row. You will notice that the grid jumps to a previous row.

Expected:

Actual:

Workaround:

 

        public class CustomGrid : RadGridView
        {
            public override string ThemeClassName
            {
                get
                {
                    return typeof(RadGridView).FullName;
                }
            }
            protected override void OnMouseDown(MouseEventArgs e)
            {
                GridExpanderItem expander = this.ElementTree.GetElementAtPoint(e.Location) as GridExpanderItem;
                if (expander != null)
                {
                    flag = true;
                }
                base.OnMouseDown(e);
            }

            protected override void OnMouseUp(MouseEventArgs e)
            {
                base.OnMouseUp(e);
                flag = false;
            }

            bool flag = false;

            protected override void OnPageChanging(object sender, PageChangingEventArgs e)
            {
                if (flag)
                {
                    e.Cancel = true;
                }
                base.OnPageChanging(sender, e);

            }
        }

 

0 comments