double-click not respecting MaxSelectionRange

4 posts, 0 answers
  1. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 18 Mar 2013 Link to this post

    Hi

    If I've set the MaxSelectionRange to allow only a single month to be selected. This works without problem when you try to select more than the required range however when you double click a month header it tries to select the relevant quarter. The display is correct but the returned start and end dates are set to the start and end of the quarter. Is there any way to stop this e.g. by turning off the double click?

    Thanks
    Keith
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 21 Mar 2013 Link to this post

    HI Keith,

    I could not reproduce the problematic behavior that you are describing. I tried setting MaxSelectionRange of 28,29,30,31 and 45, SnapToInterval both enabled and disabled and every time I double-clicked on any of the month headers the selected period was equal to the MaxSelectionRange. I have attached my test project and a screenshot of what I observed. 

    If you still experience problems, please open a formal support ticket and provide detailed information on your scenario, preferably a small runnable project and a screenshot illustrating the issue.
     

    Regards,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 22 Mar 2013 Link to this post

    Hi Petar

    Thanks for the solution but unfortunately, even in your example, the behaviour exists (albeit to a lesser extent!)... If you have SnapToInterval="True" and then single click April, you will see that the selected date range is 1 April -> 30 April. If you now double click April, the selected date range is 1 April -> 1 May. If you double click June, the  selected date range is 31 May -> 30 June.

    I can see that these are within the MaxSelectionRange of 31 days but should the SnapToInterval be used too?

    Thanks
    Keith
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 26 Mar 2013 Link to this post

    Hello Keith,

    I understand the problem that you have. You can disable the double-click functionality using custom styles. Basically, you need to remove the command, associated with the LeftDoubleClick gesture in the ItemControlStyle, SelectionRangeStyle, SelectionThumbHandleStyle, SelectionThumbHandleStyle Styles. I have attached a project, demonstrating the changes. Please note that I used NoXaml DLLs for the project.

    Kind regards,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top