DateTimeGroupDescription Extensions

9 posts, 0 answers
  1. Thomas
    Thomas avatar
    28 posts
    Member since:
    Jun 2010

    Posted 16 Apr 2013 Link to this post

    Hi,

    i am very interested for two DateTimeGroupDescription Extensions.
    I need the Steps "Hourly" and "Weekly". Also i need the possibility to customize the date text on the screen (StringFormat). 
    Do i have to implement a complete new class derived from PropertyGroupDescriptionBase for these extensions, or is there a better way?

    Also it would be great, if i could use DateTimeOffsets for the Dates (specially for DaylightSaving)

    Best Regards,
    Thomas
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 16 Apr 2013 Link to this post

    Hello Thomas,

    With the current release you will have to use a custom property group description derived from PropertyGroupDescriptionBase. We've implemented a simple project to help you with this task. I want to inform you that we are working on this problem and most probably with our Q2 release you'll be able to define the steps in an easier manner.

    I've included your feature request for DateTimeOffset in our internal system and we'll try to push it for our Q2 release. Hopefully this is acceptable.

    Please check the attachment and inform us if you have any problems or concerns.

    Greetings,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Thomas
    Thomas avatar
    28 posts
    Member since:
    Jun 2010

    Posted 17 Apr 2013 Link to this post

    Hello,

    this looks good. Now i could try to change the GroupDescription class in dependency to the selected Step (for Hour the new description and for the others the standard DateTimeGroupDescription).
    But how can i change the output format for in the DateTimeGroupDescription without implementing a new version of DateTimeGroupDescription by my self?

    I need the output format "dd.MM.yyyy (HH:mm)". 

    Edit: Another Question:

    Is it possible to create a own date filter. this filter should filter all dates wich are not within a given timerange.

    Best Regards,
    Thomas

  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 17 Apr 2013 Link to this post

    Hello Thomas,

    You can modify ToString method of GroupObj in the application I've sent you. As you see, the current code will convert the values to hours, but you can set whatever format you need.

    For your second question - we are working on such functionality and we'll notify you immediately when we have date filters.

    Hopefully this helps. Feel free to contact us if you have any problems or concerns.

    Greetings,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Thomas
    Thomas avatar
    28 posts
    Member since:
    Jun 2010

    Posted 17 Apr 2013 Link to this post

    Hello,

    i mean how can i change the outputformat for the standard DateTimeGroupDescription? The class GroupObj is only used for the custom hourly aggregation. 


    Thanks for your answer. Do you think, the date filter will be released in the Q2 realise? Is there no workarround currently possible (deriving from a class?)

    Best Regards,
    Thomas
  7. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 17 Apr 2013 Link to this post

    Hi Thomas,

    We will do our best to have date filters in our Q2 release. For the moment there's no workaround that you can use.

    I'm not sure I fully understand your idea of changing DateTimeGroupDescription output format. When you use this kind of grouping, you have to set a step for the groups (by default it is set to Year). So data in RadPivotGrid is shown based on this step (ex. 2010, 2011...). If you would like to see the full date and group by it, you can replace DateTimeGroupDescription with PropertyGroupDescription in your code. This way each day will be treated as a string and grouped only by this string representation. We have not considered changing the string format of DateTimeGroupDescription as it is showing group - year, month, quarter, not particular date.

    Could you try using PropertyGroupDescription and also send us more details for your case? I'm looking forward to hearing from you.

    Kind regards,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Thomas
    Thomas avatar
    28 posts
    Member since:
    Jun 2010

    Posted 17 Apr 2013 Link to this post

    Hello,

    i try to explain my requierement with a concrete example:

    When i use DateTimeGroupDescription with Step = Day, the Output for date 01.01.2012 is "Jan-1". But i don't want "Jan-1", i want to see "01.01.2012".

    I want to use DateTimeGroupDescription, because my data is hourly and i want to use the aggregation from this class.

    Best Regards,
    Thomas
  9. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 17 Apr 2013 Link to this post

    Hello Thomas,

    Thank you for your clarification. Let me explain the mechanism of DateTime grouping by day - if you have some data for 01.01.2010 and more data for 01.01.2011, RadPivotGrid will group the two of them inside one group - Jan-1. So you cannot show the value 01.01.2010 because you have values for 01.01.2011 in it.
    Currently there is no way to achieve this functionality via DateTimeGroupDescription, so you will have to create a new class and derive from PropertyGroupDescriptionBase.

    Hopefully this makes sense.

    Greetings,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  10. Thomas
    Thomas avatar
    28 posts
    Member since:
    Jun 2010

    Posted 17 Apr 2013 Link to this post

    Hello,

    thank you for your explanation. Now i understand the problem. Fortunaltely i was able to extend your sample project for a day group.

    Best Regards,
    Thomas
Back to Top
UI for WPF is Visual Studio 2017 Ready