This is a migrated thread and some comments may be shown as answers.

DataFormatString Not Working

3 Answers 135 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
steve
Top achievements
Rank 1
steve asked on 16 Aug 2012, 06:42 PM
I cant seem to get formatting working in the Pivot Grid. For example, here us the code, but the date is always shown unformatted.

        <telerik:PivotGridRowField Caption="TransDate" DataField="TransDate" SortOrder="Descending"
            DataFormatString="{0:MM/dd/yy}">


3 Answers, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 21 Aug 2012, 08:58 AM
Hello,

Indeed I could replicate the same problem on my end. It is first time reported. I am logging it as a bug in our tracking system and our developers will have the care to fix it. Your Telerik points are updated accordingly.
You can follow the PITS Issue by its ID: 12368
Here you can find the PITS Issue: Public URL

Kind regards,
Milena
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 03 May 2013, 11:19 AM
Hi,

Has this problem been solved? I have the same problem with the date format string not working for Row header total (Telerik.web.ui version 2013.1.417.40). Have a look at the attached image.

<telerik:PivotGridRowField DataField="StatusDate" Caption="Status date" DataFormatString="{0:dd-MM-yyyy}" TotalFormatString="{0:dd-MM-yyyy}"></telerik:PivotGridRowField>




0
Milena
Telerik team
answered on 08 May 2013, 07:54 AM
Hello,

Indeed I could replicate the same problem on my end. I am logging it as a bug in our tracking system and our developers will have the care to fix it. Meantime, you can use the following code as a possible workaround:

protected void CellDataBounded(object source, Telerik.Web.UI.PivotGridCellDataBoundEventArgs e)
      {
     
           
          PivotGridRowHeaderCell headerCell = e.Cell as PivotGridRowHeaderCell;
 
          if (headerCell != null && headerCell.IsTotalCell && headerCell.Field.DataField == "FieldName")
          {
             
                  headerCell.Text = "Test";
     
             
          }
      }



Regards,
Milena
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
PivotGrid
Asked by
steve
Top achievements
Rank 1
Answers by
Milena
Telerik team
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or