Articles in this section
Category / Section

Hide the dimensions present in Cube Dimension Browser in WebForms?

1 min read

You can hide the dimensions present in Cube Dimension Browser using the following code example in PreRender event.

C#

void OlapClient1_PreRender(object sender, EventArgs e)
{
    TreeNodeCollection tree = this.OlapClient1.CubeDimensionBrowser.Nodes[0].ChildNodes;
    for (int i = tree.Count - 1; i >= 0; i--)
    {
        if (tree[i].Text != "Customer" || tree[i].Text != "Employee")
            tree.RemoveAt(i);
    }
}

VB

Private Sub OlapClient1_PreRender(ByVal sender As Object, ByVal e As EventArgs)
                Dim tree As TreeNodeCollection = Me.OlapClient1.CubeDimensionBrowser.Nodes(0).ChildNodes
                For i As Integer = tree.Count - 1 To 0 Step -1
                                If tree(i).Text <> "Customer" OrElse tree(i).Text <> "Employee" Then
                                                tree.RemoveAt(i)
                                End If
                Next i
End Sub

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied