Hi,
I need to know when user used arrows for changing value.
Create new project, drop RadDateTimePicker, double click on form to create Load and paste this code:
Only radDateTimePicker1_MouseDown work when you click on arrow but this occurred after radDateTimePicker1_ValueChanged.
I my case i need to know when user clicked arrow before changing value.
I also try to add this event
... but ArrowButton object is null.
Please give me some advice how to check if user click arrows before value was changed.
I need to know when user used arrows for changing value.
Create new project, drop RadDateTimePicker, double click on form to create Load and paste this code:
private
void
Form1_Load(
object
sender, EventArgs e)
{
radDateTimePicker1.Format = DateTimePickerFormat.Time;
radDateTimePicker1.ShowUpDown =
true
;
radDateTimePicker1.MouseDown += radDateTimePicker1_MouseDown;
radDateTimePicker1.DateTimePickerElement.MouseDown += DateTimePickerElement_MouseDown;
radDateTimePicker1.DateTimePickerElement.TextBoxElement.MouseDown += TextBoxElement_MouseDown;
radDateTimePicker1.ValueChanged += radDateTimePicker1_ValueChanged;
}
void
radDateTimePicker1_ValueChanged(
object
sender, EventArgs e)
{
Console.WriteLine(
"value changed: "
+ radDateTimePicker1.Value);
}
void
TextBoxElement_MouseDown(
object
sender, EventArgs e)
{
Console.WriteLine(
"radDateTimePicker1.DateTimePickerElement.TextBoxElement"
);
}
void
DateTimePickerElement_MouseDown(
object
sender, EventArgs e)
{
Console.WriteLine(
"radDateTimePicker1.DateTimePickerElement"
);
}
void
radDateTimePicker1_MouseDown(
object
sender, MouseEventArgs e)
{
Console.WriteLine(
"radDateTimePicker1"
);
}
Only radDateTimePicker1_MouseDown work when you click on arrow but this occurred after radDateTimePicker1_ValueChanged.
I my case i need to know when user clicked arrow before changing value.
I also try to add this event
radDateTimePicker1.DateTimePickerElement.ArrowButton.Click += ArrowButton_Click;
... but ArrowButton object is null.
Please give me some advice how to check if user click arrows before value was changed.