Completed
Last Updated: 10 Sep 2015 06:40 by ADMIN
ADMIN
Hristo
Created on: 28 Jul 2015 11:14
Category: PivotGrid
Type: Bug Report
1
FIX. RadPivotGrid - vertical scroll bar of PivotGroupFilterPopup is not present although needed
Workaround: 

private void radPivotGrid1_GroupDescriptorElementCreating(object sender, Telerik.WinControls.UI.GroupDescriptorElementCreatingEventArgs e)
{
    e.GroupDescriptorElement.FilterPopup.PopupOpened -= FilterPopup_PopupOpened;
    e.GroupDescriptorElement.FilterPopup.PopupOpened += FilterPopup_PopupOpened;
}

private void FilterPopup_PopupOpened(object sender, EventArgs args)
{
    PivotGroupFilterPopup filterPopup = (PivotGroupFilterPopup)sender;
    RadTreeView tree = filterPopup.TreeViewMenuItem.TreeElement.TreeView;
    int height = this.CalculateHeight(tree);
    if (height > tree.Height)
    {
        ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Value = 0;
        ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Maximum = height;
        ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Visibility = Telerik.WinControls.ElementVisibility.Visible;
    }
}

private int CalculateHeight(RadTreeView tree)
{
    int height = 0;
    for (int i = 0; i < tree.Nodes[0].Nodes.Count + 1; i++)
    {
        height += tree.ItemHeight;
    }

    return height;
}

0 comments