Declined
Last Updated: 29 Aug 2014 13:22 by ADMIN
ADMIN
Angel Petrov
Created on: 28 Aug 2014 07:43
Category: PivotGrid
Type: Bug Report
1
The DataFormatString of the PivotGridReportFilterField is not applied correctly.

		
1 comment
ADMIN
Radoslav
Posted on: 29 Aug 2014 13:22
This is not a bug. This is a limitation into the RadPivtoGrid – there is not property for formatting the text into the FilterWindow’s ListBox items. The PivtoGrid fields’s DataFormatString is applied over the calculated fields not on the FilterWindow’s ListBox items. A possible workaround here is to handle the RadPivotGrid.FilterWindow.SetBox.ItemCreated event and to format the text manually:
protected override void OnInit(EventArgs e)
{
    base.OnInit(e);

    RadPivotGrid1.FilterWindow.SetBox.ItemCreated += SetBox_ItemCreated;
}

void SetBox_ItemCreated(object sender, RadListBoxItemEventArgs e)
{
    if (e.Item.Value != "SelectAll" && RadPivotGrid1.FilterWindow.IsReportFilter)
    {
        e.Item.Text = String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(e.Item.Text));
    }
}