DataFormatString Not Working

4 posts, 0 answers
  1. steve
    steve avatar
    2 posts
    Member since:
    Aug 2006

    Posted 16 Aug 2012 Link to this post

    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}">


  2. Milena
    Admin
    Milena avatar
    224 posts

    Posted 21 Aug 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Morten
    Morten avatar
    267 posts
    Member since:
    Jul 2012

    Posted 03 May 2013 Link to this post

    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>

    
    
    
    
  5. Milena
    Admin
    Milena avatar
    224 posts

    Posted 08 May 2013 Link to this post

    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.
Back to Top