|
Query |
Response | |
|
Our requirement is to change the display-name only of any column (even nested). Looking at the provided solution, we are going to change the field Value, which would means to loose any correlation with underlying data.
We are approching relational data with custom dictionary on column values means that a column may indeed have value: 1, and displayed as "Foo", while its value is unchaged. When you filter, you will see "Foo" but the value sent will be 1.
That way we consider our requirement accomplished. |
With the provided information, we understand that your requirement is to change member caption displayed in PivotGrid column header. Please find the code snippet below
Code Snippet: [C#]
Note: Need to change total text while changing member text and need to trigger “PivotSchemaChanged” in all action methods.
Meanwhile we have also prepared a sample based on your requirement.
Sample: http://www.syncfusion.com/downloads/support/forum/136290/ze/PivotGrid_MemberCaption179765584
Note: While opening filter dialog currently we don’t have any option to change member caption and we need to under some source level changes to achieve your requirement. The fix for this issue is estimated to be available in our Essential Studio 2018 Volume 1 Service Pack Release 1 which is estimated to be rolled out by end of March 2018. | |
|
When we'll go to OLAP we'll get still the same requirements: we need the engine, filters, ordering (etc) work with real values, while letting user to "Decode" its own fashion any categorical Data the engine provide to the page.
If this is not possible, will be possible in version 2? Is there another way to accomplish our requirement (a doubled dialect on categorical data)? We know of joining table, but we can't afford to go that way, nor to operate client-side. We need to do this server-side and stay inobtrusive to the pivot engine. |
You can customize the required header text that needs to display in PivotGrid with the help of member caption property available in OLAP cube and all our features will work based on member name not on member caption as per your requirement. And currently we don’t have support to change member caption for “en-US” culture (Locale identifier 1033). Meanwhile we suggest you try with different locale identifier. Please find the localization sample in the below link
Sample:
Documentation
|
|
[System.Web.Http.ActionName("InitializeClient")]
[System.Web.Http.HttpPost]
public Dictionary<string, object> InitializeClient(Dictionary<string, object> jsonResult)
{
this.BindData();
pivotClient.PivotEngine.PivotSchemaChanged += PivotEngine_PivotSchemaChanged;
return pivotClient.GetJsonData(jsonResult["action"].ToString(), ProductSales.GetSalesData(), jsonResult["clientParams"].ToString());
}
void PivotEngine_PivotSchemaChanged(object sender, PivotSchemaChangedArgs e)
{
if (pivotClient.PivotEngine.PivotValues != null)
for (int i = 0; i < pivotClient.PivotReport.PivotColumns.Count; i++)
{
pivotClient.PivotEngine.PivotValues[i].ForEach(x =>
{
//Customizing header text
if (x != null && x.FormattedText == "Bike")
{
x.FormattedText = "ME";
x.Value = "ME";
}
else if (x != null && x.FormattedText == "Bike Total")
x.FormattedText = "ME Total";
//Note: While customizing header text need to customize total values also like above in order to work drilldown related scenarios correctly.
});
}
}
|
Hi SimoneWe understand that your requirement is customize the header text displayed in the PivotGrid and PivotChart for PivotClient control. We have prepared sample based on your requirement Please find the sample and code snippet below for more details.Code Snippet: [C#]
[System.Web.Http.ActionName("InitializeClient")][System.Web.Http.HttpPost]public Dictionary<string, object> InitializeClient(Dictionary<string, object> jsonResult){this.BindData();pivotClient.PivotEngine.PivotSchemaChanged += PivotEngine_PivotSchemaChanged;return pivotClient.GetJsonData(jsonResult["action"].ToString(), ProductSales.GetSalesData(), jsonResult["clientParams"].ToString());}void PivotEngine_PivotSchemaChanged(object sender, PivotSchemaChangedArgs e){if (pivotClient.PivotEngine.PivotValues != null)for (int i = 0; i < pivotClient.PivotReport.PivotColumns.Count; i++){pivotClient.PivotEngine.PivotValues[i].ForEach(x =>{//Customizing header textif (x != null && x.FormattedText == "Bike"){x.FormattedText = "ME";x.Value = "ME";}else if (x != null && x.FormattedText == "Bike Total")x.FormattedText = "ME Total";//Note: While customizing header text need to customize total values also like above in order to work drilldown related scenarios correctly.});}}If this doesn’t match your requirement, kindly provide more details about your requirement with sample/video (if possible) which would be helpful for us to proceed further.Regards,Tamilarasu M
|
S.No |
Query |
Comments |
|
1. |
Hi. there is a way to do the same thing of the last post with Olap Source? |
We don’t have any separate event to change the member caption in OLAP. But, you can customize the required header text that needs to display in PivotGrid with the help of member caption property available in OLAP cube and all our features will work based on member name not on member caption as per your requirement. Kindly refer below link.
https://docs.microsoft.com/en-us/sql/analysis-services/lesson-9-2-defining-and-browsing-translations
And currently we don’t have support to change member caption for “en-US” culture (Locale identifier 1033). Meanwhile we suggest you try with different locale identifier. Please find the localization sample in the below link.
Sample:
Documentation
|
|
2. |
And other question is: can use drillThrough with custom text? |
We have faced issue while using Drillthrough after customizing header text and we have fixed this issue, which is included in our Essential Studio Volume 1, SP 1 2018 (v16.1.0.32) and is available for download under the following link.
Kindly refer below documentation link to enable DrillThrough in PivotGrid.
|
|
Query |
Response | |||
|
1. Syncronize change of schema "live" in a PivotGrid with a PivotChart => this is naturally achieved by pivotClient (keep in mind we might fall-back to separated controls, yet) |
You can synchronize PivotSchemaDesigner for separated controls (PivotGrid and PivotChart). But While using PivotSchemaDesigner with PivotChart, you will have to face some limitations (like drilldown etc). So it is better to use PivotClient for synchronizing schema changes with PivotGrid and PivotChart controls. | |||
|
2. Let the user define at run time its own dictionary in any column: that means we won't change the OLAP representation, but only the view one. This may sound trivial but it isn't: we don't have to affect the value, but only the displayName and only in View, per-user; |
Currently we don’t have “Caption Text support for headers in OLAP datasource”. We have logged this as improvement. It be available in the upcoming Essential Studio 2018 Volume 1 SP2 release. | |||
|
3. We need to drill-through both in relational and olap scenario, possibly keeping any custom dictionary applied. We can't afford to send the custom header provided "live" back to the underlying OLAP o persistence engine, we need the pivot-engine or a customized pivot-engine to handle this while computing the data. |
For Relational:
Currently drillThrough will not work for relational datasource. We have already logged this as an issue and the fix for the issue will be available in the upcoming Essential Studio 2018 Volume 1 SP2 release which is estimated to be available .
For Olap:
You can have drillThrough support for OLAP with custom captions. This problem will be solved by the response given in the second query.
| |||
|
4. You mentioned that the OLAP cube should "support drill-trough features": once again I get confused here: you sent me a link to a properly created cube, however which it was that did the trick? How should I build-up the cube in order to support drilling? |
You can configure drillThrough in cube level(SSAS) by following the below link.
| |||
|
5. As you pointed out in the very first stage of my spiking, we need to paginate for we are going to have lot of records. |
You can use paging support for Pivot Controls while binding large set of records. Please refer the code snippet below.
Code Snippet: [cshtml]
Code Snippet: [C#]
For Relational:
For OLAP:
Please find the below documentation link for more details.
|
Hi Simone,
Please find the response below.
Query Response 1. Syncronize change of schema "live" in a PivotGrid with a PivotChart => this is naturally achieved by pivotClient (keep in mind we might fall-back to separated controls, yet) You can synchronize PivotSchemaDesigner for separated controls (PivotGrid and PivotChart). But While using PivotSchemaDesigner with PivotChart, you will have to face some limitations (like drilldown etc). So it is better to use PivotClient for synchronizing schema changes with PivotGrid and PivotChart controls. 2. Let the user define at run time its own dictionary in any column: that means we won't change the OLAP representation, but only the view one. This may sound trivial but it isn't: we don't have to affect the value, but only the displayName and only in View, per-user; Currently we don’t have “Caption Text support for headers in OLAP datasource”. We have logged this as improvement. It be available in the upcoming Essential Studio 2018 Volume 1 SP2 release. 3. We need to drill-through both in relational and olap scenario, possibly keeping any custom dictionary applied. We can't afford to send the custom header provided "live" back to the underlying OLAP o persistence engine, we need the pivot-engine or a customized pivot-engine to handle this while computing the data. For Relational:Currently drillThrough will not work for relational datasource. We have already logged this as an issue and the fix for the issue will be available in the upcoming Essential Studio 2018 Volume 1 SP2 release which is estimated to be available .
For Olap:You can have drillThrough support for OLAP with custom captions. This problem will be solved by the response given in the second query. 4. You mentioned that the OLAP cube should "support drill-trough features": once again I get confused here: you sent me a link to a properly created cube, however which it was that did the trick? How should I build-up the cube in order to support drilling? You can configure drillThrough in cube level(SSAS) by following the below link.
5. As you pointed out in the very first stage of my spiking, we need to paginate for we are going to have lot of records. You can use paging support for Pivot Controls while binding large set of records. Please refer the code snippet below.
Code Snippet: [cshtml]
@Html.EJ().Pivot().PivotGrid("PivotGrid1").Url(Url.Content("../api/PivotGrid"))@Html.EJ().Pivot().PivotPager("Pager1").Mode(PivotPagerMode.Both).TargetControlID("PivotGrid1")Code Snippet: [C#]For Relational:
PivotReport pivotReport = new PivotReport();pivotReport.EnablePaging = true;pivotReport.PagerOptions.SeriesPageSize = 4;pivotReport.PagerOptions.CategoricalPageSize = 5;pivotReport.PagerOptions.SeriesCurrentPage = 1;pivotReport.PagerOptions.CategoricalCurrentPage = 1;For OLAP:
OlapReport olapReport = new OlapReport();olapReport.CurrentCubeName = "Adventure Works";olapReport.EnablePaging = true;olapReport.PagerOptions.SeriesPageSize = 4;olapReport.PagerOptions.CategoricalPageSize = 5;olapReport.PagerOptions.CategoricalCurrentPage = 1;olapReport.PagerOptions.SeriesCurrentPage = 1;Please find the below documentation link for more details.
Regards,Scintilla A