Ticket T234004
Visible to All Users

Problem when using a RangeControl with ScaleBasedRangeControlClient

created 10 years ago

Hello,

I use a RangeControl with a ScaleBasedRangeControlClient to make my datenavigator.

I see you have used a ScaleBasedRangeControlClient in your SchedulerControl.
So I've tried to do the same but I've got some problem.

- If you click on the scale header the selected range does not changed (work fine in the SchedulerControl).

- I've set the MaxSelectedIntervalCount at 1. if you increase this interval with the mouse by the right this limitation work fine.
  But if you increase this interval with the mouse by the left it does not. So you can have more than one interval.

- I have a problem when I want to forbid the change of the selected range and reselect the old date.
  If the user have selected a date after the current date,  it's work fine.
  if the user have selected a date before the current date, the old range was not selected.

Best regards

(code sample joined to the issue)

Answers approved by DevExpress Support

created 10 years ago (modified 10 years ago)

Hi,

The ScaleBasedRangeControlClient class was designed for internal use only. For your scenario, I suggest you use the following descendant:

C#
public class MyScaleBasedRangeControlClient : ScaleBasedRangeControlClient { public MyScaleBasedRangeControlClient() { } protected override void ApplyHitInterval(TimeInterval interval) { base.ApplyHitInterval(interval); RefreshLayout(); } protected override void OnRangeChangedCore(object rangeMinimum, object rangeMaximum) { base.OnRangeChangedCore(rangeMinimum, rangeMaximum); RefreshLayout(); } }

I hope you will find this information helpful.

    Comments (2)

      Hi,
      Thank you for the speed of your answer.
      That works perfectly in my code sample.
      Thank you.
      Best regards

      DevExpress Support Team 10 years ago

        You are welcome!

        I am happy to hear that my assistance was helpful to you.
        Should you have any questions regarding our products, do not hesitate to contact us.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.