Odd DataStringFormat Behaviour

2 posts, 0 answers
  1. Ron
    Ron avatar
    86 posts
    Member since:
    Sep 2009

    Posted 08 Oct 2013 Link to this post

    I have noticed since I have upgraded to the latest version release of the Telerik ASP controls a strange behaviour with the DataStringFormat.  Previously, all my HTMLChart controls I was just specifying DataStringFormat="{0}" as I was already formatting the returned date from the SQL query in the MM/dd/yyyy format.  Once I upgraded my controls, whenever a date was being displayed on the chart for the axis label, it would instead show the actual characters {0}, not the date anymore.  I tried changing value to DataStringFormat="{0:MM/dd/yyyy}" and that did not work either, it would show like this {0:01/29/2013} on the axis.  Finally, I just took out the curly brackets and zero and used this DataStringFormat="MM/dd/yyyy" which worked.  This seems to only be a problem when using the {0} for the DataStringFormat on dates, but if it is just a number, like 10000 and I use DataStringFormat="{0:N0}" it shows correctly as 10,000.  Same thing with any other type of data aside of a date value.

    Any idead why this is happening and why I cannot be consistant with the way the DataStringFormat is normally defined using the curly brackets and 0?

  2. Stamo Gochev
    Stamo Gochev avatar
    224 posts

    Posted 09 Oct 2013 Link to this post

    Hello Ron,

    Thanks for your feedback. I have researched the case and it turned out to be a bug, so I logged an item in our Feedback portal, where you can track its status and vote for it. I have also updated your Telerik points.

    Stamo Gochev
    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 the blog feed now.
Back to Top