Unplanned
Last Updated: 22 Jul 2020 15:39 by ADMIN
Ryan
Created on: 22 Jul 2020 14:52
Category: GridView
Type: Bug Report
0
RadGridView: In hierarchy grid CurrentViewChanged event is not triggered when select a tab which has RowsCount = 0

To reproduce:

1. Expand a parent row in hierarchical grid.

2. Click on the second tab

3. If the child grid doesn't have any rows, the CurrentViewChanged event will not fire.

1 comment
ADMIN
Nadya
Posted on: 22 Jul 2020 15:39

Hello, Ryan,

You can use the following code snippet to work around the issue:

//Workaround: Handle ItemClicked event of the pageview element
private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
    GridDetailViewCellElement cell = e.CellElement as GridDetailViewCellElement;
    if (cell != null)
    {
        var pageviewElement = cell.PageViewElement as RadPageViewStripElement;

        pageviewElement.ItemClicked -= this.PageviewElement_ItemClicked;
        pageviewElement.ItemClicked += this.PageviewElement_ItemClicked;
    }
}

private void PageviewElement_ItemClicked(object sender, EventArgs e)
{
}

 

Regards,
Nadya
Progress Telerik

Attached Files: