hi all
i want to send a question to user "are u sure to switch off?" when user click on slide the toggle switcher.
how can do this?
set the snipped code in valueChanging action, but if user click on "No", the toggle switch to off!
if
(switchtg.Value)
{
RadMessageBox.Instance.StartPosition = FormStartPosition.CenterParent;
if
(RadMessageBox.Show(
"Are u sure ?"
,
"disconnecting..."
, MessageBoxButtons.YesNo,
RadMessageIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
//_allowdc = true;
switchtg.Value =
true
;
//switchtg.ValueChanged -= switchtg_ValueChanged;
}
else
{
// _allowdc = false;
switchtg.Value =
false
;
//switchtg.ValueChanged -= switchtg_ValueChanged;
}
}