Articles in this section
Category / Section

How to read the MDX query at service in JavaScript PivotGrid?

1 min read

This KB illustrates that how to read MDX query at service.


To read the MDX query at service, refer to the following code example.


public Dictionary<string, object> InitializeClient(string action, string customObject, string clientParams)
            OlapDataManager DataManager = null;
            dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
            if (customData.ContainsKey("Language"))
                var cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
                connectionString = connectionString.Replace("" + cultureIDInfoVal + "", "" + cultureIDInfo + "");
                cultureIDInfoVal = cultureIDInfo;
                DataManager = new OlapDataManager(connectionString);
                DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
                DataManager = new OlapDataManager(connectionString);   
            DataManager.BeforeMdxQueryExecute += DataManager_BeforeMdxQueryExecute;
            return olapClientHelper.GetJsonData(action, DataManager, clientParams);
void DataManager_BeforeMdxQueryExecute(object sender, QueryExecutingEventArgs e)
           //other code



Public Function InitializeClient(ByVal action As String, ByVal customObject As String, ByVal clientParams As String) As Dictionary(Of String, Object)
 Dim DataManager As OlapDataManager = Nothing
 Dim customData As dynamic = serializer.Deserialize(Of dynamic)(customObject.ToString())
 If customData.ContainsKey("Language") Then
 Dim cultureIDInfo = New System.Globalization.CultureInfo((customData("Language"))).LCID
 connectionString = connectionString.Replace("" & cultureIDInfoVal & "", "" & cultureIDInfo & "")
 cultureIDInfoVal = cultureIDInfo
 DataManager = New OlapDataManager(connectionString)
 DataManager.Culture = New System.Globalization.CultureInfo((customData("Language")))
  DataManager = New OlapDataManager(connectionString)
 End If
  AddHandler DataManager.BeforeMdxQueryExecute, AddressOf DataManager_BeforeMdxQueryExecute
  Return olapClientHelper.GetJsonData(action, DataManager, clientParams)
End Function
Private Sub DataManager_BeforeMdxQueryExecute(ByVal sender As Object, ByVal e As QueryExecutingEventArgs)
  'other code
End Sub



I hope you enjoyed learning about how to read the MDX query at service.

You can refer to our JavaScript PivotGrid feature tour
page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript PivotGrid example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!


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