Remove "Drop pivot fields here to filter by"
Hello,
I am Using Winforms PivotGrid Control in a C# .NET application. I want to remove text "Drop pivot fields here to filter by". By any means is there any possibility to remove or change this text?
SIGN IN To post a reply.
2 Replies
TB
Thirupathi Bala Krishnan
Syncfusion Team
July 12, 2019 01:46 PM UTC
Hi Bilal Raja,
Thanks for contacting Syncfusion support.
Currently we are checking on the reported query-“How to change the filter area header text”, we will validate and update you the further details on July 15, 2019.
Currently we are checking on the reported query-“How to change the filter area header text”, we will validate and update you the further details on July 15, 2019.
We appreciate your patience until then.
Regards,
Thirupathi B.
Regards,
Thirupathi B.
SP
Subburaj Pandian Veluchamy
Syncfusion Team
July 15, 2019 10:47 AM UTC
Hi Bilal Raja,
Thank you for your patience.
We have analyzed the reported query “How to change the filter area header text in pivot grid control”. You can achieve this requirement by assigning the own text value inside the QueryCellInfo even thandler of FilterArea. Here, the text values are rendered based on the given row and column index within the event handler.
Please refer the following code example,
We have analyzed the reported query “How to change the filter area header text in pivot grid control”. You can achieve this requirement by assigning the own text value inside the QueryCellInfo even thandler of FilterArea. Here, the text values are rendered based on the given row and column index within the event handler.
Please refer the following code example,
|
# Form1.cs
public Form1()
{
InitializeComponent();
this.InitializePivotGrid();
}
private void InitializePivotGrid()
{
// Adding ItemSource to the Control
this.pivotGridControl1.ItemSource = ProductSalesData.GetSalesData();
// Adding PivotRows to the Control
this.pivotGridControl1.PivotRows.Add(new PivotItem { FieldMappingName ="Product", TotalHeader = "Total" });
this.pivotGridControl1.PivotRows.Add(new PivotItem { FieldMappingName ="Date", TotalHeader = "Total" });
// Adding PivotColumns to the Control
this.pivotGridControl1.PivotColumns.Add(new PivotItem { FieldMappingName = "Country", TotalHeader = "Total" });
this.pivotGridControl1.PivotColumns.Add(new PivotItem { FieldMappingName = "State", TotalHeader = "Total" });
// Adding PivotCalculations to the Control
this.pivotGridControl1.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Amount", Format = "$ #,##0.00", SummaryType = SummaryType.DoubleTotalSum });
this.pivotGridControl1.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Quantity", Format = "#,##0" });
this.pivotGridControl1.ShowGroupBar = true;
this.pivotGridControl1.TableControl.FilterArea.QueryCellInfo += FilterArea_QueryCellInfo;
}
private void FilterArea_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 2 && e.ColIndex == 1)
{
e.Style.Text = "Drop fields here";
e.Style.TextColor = System.Drawing.Color.White;
}
} |
Please refer the following screenshot,
We hope this helps. Please let us know, if you would require any further assistance.
Regards,
Subburaj Pandian V
Subburaj Pandian V
SIGN IN To post a reply.
- 2 Replies
- 3 Participants
-
BR Bilal Raja
- Jul 11, 2019 06:13 PM UTC
- Jul 15, 2019 10:47 AM UTC