3 Sep 20201 minute to read
The left and right thumb of
SfDateTimeRangeNavigator are used to indicate the selected range in the large collection of data. Following are the ways you can select a range.
- By dragging the thumbs.
- By tapping on the minor and major labels.
- By setting the
Following code example shows how to configure the selected range using
ViewRangeEnd properties of
SfDateTimeRangeNavigator sfRangeNavigator = new SfDateTimeRangeNavigator(); sfRangeNavigator.ViewRangeStart = new GregorianCalendar(2015, 4, 1).Time; sfRangeNavigator.ViewRangeEnd = new GregorianCalendar(2016, 9, 1).Time;
RangeChanged event will be fired whenever you drag the thumbs. If you are doing some long running tasks in this event handler, then dragging the thumbs will not be smooth. You can delay this event by enabling
DeferredUpdateEnabled property. If this property is set to true, the
RangeChanged event will get fired only when you stop dragging or if the thumb is held for more than 500 milliseconds. If it is false, the range will be updated for every movement of the thumb. However, It is true by default.
SfDateTimeRangeNavigator sfRangeNavigator = new SfDateTimeRangeNavigator(); sfRangeNavigator.DeferredUpdateEnabled = false; sfRangeNavigator.DeferredUpdateDelay = 600;