We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to clear all dimensions and disable the pager option using an external button?

Platform: ASP.NET Web Forms (Classic) |
Control: OlapClient

This KB illustrates that how to clear all dimensions and disable the pager option.


You can clear all dimensions and disable the pager option using an external button through the following code example.


protected void Button1_Click(object sender, EventArgs e)
  OlapClient1.EnablePaging = false;
  OlapDataManager DataManager = new OlapDataManager(@"Data Source = localhost; Initial Catalog = Adventure Works DW;");
  OlapClient1.OlapDataManager = DataManager;
  if (this.OlapClient1.ActiveView == "Grid")
     OlapClient1.OlapGridCallBackPanel.ContentTemplateContainer.Controls.RemoveAt(OlapClient1.OlapGridCallBackPanel.ContentTemplateContainer.Controls.Count - 1);
      OlapClient1.OlapChartCallBackPanel.ContentTemplateContainer.Controls.RemoveAt(OlapClient1.OlapChartCallBackPanel.ContentTemplateContainer.Controls.Count - 1);


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
OlapClient1.EnablePaging = False
Dim DataManager As OlapDataManager = New OlapDataManager("Data Source =  localhost; Initial Catalog = Adventure Works DW;")
OlapClient1.OlapDataManager = DataManager
If Me.OlapClient1.ActiveView = "Grid" Then
OlapClient1.OlapGridCallBackPanel.ContentTemplateContainer.Controls.RemoveAt(OlapClient1.OlapGridCallBackPanel.ContentTemplateContainer.Controls.Count - 1)
OlapClient1.OlapChartCallBackPanel.ContentTemplateContainer.Controls.RemoveAt(OlapClient1.OlapChartCallBackPanel.ContentTemplateContainer.Controls.Count - 1)
End If
End Sub


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile