Articles in this section
Category / Section

How to change the position of Word, PDF & Excel button in OLAP Client toolbar?

1 min read

 

You can change the position of the buttons in toolbar by adding child controls to its parent control accordingly. You can refer to the following code examples.

C#

protected void Page_Load(object sender, EventArgs e)
{
     CustomizeChildControl(this.OlapClient1.OlapToolBar.Controls);
}
private List<Control> listOfControls = new List<Control>();
private void CustomizeChildControl(ControlCollection ctrlCollection)
{
    Control parent = null;
    foreach (Control ctrl in ctrlCollection)
    {
        if ((ctrl is LinkButton))
        {
            parent = ctrl.Parent;
            listOfControls.Add(ctrl);
        }
    }
    if (parent == null) return;
    for (var i = listOfControls.Count - 1; i >= 0; i--)   parent.Controls.Add(listOfControls[i]);
}

 

VB

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
                 CustomizeChildControl(Me.OlapClient1.OlapToolBar.Controls)
End Sub
Private listOfControls As List(Of Control) = New List(Of Control)()
Private Sub CustomizeChildControl(ByVal ctrlCollection As ControlCollection)
                Dim parent As Control = Nothing
                For Each ctrl As Control In ctrlCollection
                                If (TypeOf ctrl Is LinkButton) Then
                                                parent = ctrl.Parent
                                                listOfControls.Add(ctrl)
                                End If
                Next ctrl
                If parent Is Nothing Then
                Return
                End If
                For i = listOfControls.Count - 1 To 0 Step -1
                parent.Controls.Add(listOfControls(i))
                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