This is a migrated thread and some comments may be shown as answers.

RadPopupCloseReason difference between AutoClose and ManualClose

5 Answers 67 Views
DesktopAlert
This is a migrated thread and some comments may be shown as answers.
SomeName
Top achievements
Rank 1
SomeName asked on 19 Sep 2011, 01:10 PM
Hi.

Correct me if i am wrong but i dont see a difference between AutoClose and ManualClose (hitting the predefined CloseButton) in the RadPopupCloseReason Enum.

I would like to suggest this feature in the next version!!!

Is there a way to do this with the current version?

5 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 22 Sep 2011, 08:43 AM
Hello Somename,

I am not sure that I can understand your inquiry. Could you please elaborate a bit more and describe your scenario in detail. Currently, there are no AutoClose and ManualClose options in RadPopupCloseReason event arguments. However, the CloseCalled option allows you to determine whether the popup was closed programmatically.

Regards,
Jack
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
SomeName
Top achievements
Rank 1
answered on 22 Sep 2011, 01:35 PM
Sry for my poor explanation.

Lets try it this way:
I have a RadDesktopAlert with the default CloseButton (X at TopRight Corner) and the Alert is set to AutoClose after a certain time.
As you mentioned there is CloseCalled which is set when some "programmatically" calls the Close method.

The problem i am facing is that there is no difference between AutoClose (Close Reason = CloseCalled) and the user hitting the CloseButton (X at TopRight Corner) this is has the same CloseReason (CloseCalled).

What i want to know is when did the user hit the X Button and when did the Alert close automatically?

I think the RadPopupCloseReason lack this information, so is there another way?

I need this, because my application should think when the Alert closes automatically the user is inactive, else when the user activly hits the close button.
0
Accepted
Jack
Telerik team
answered on 27 Sep 2011, 08:14 AM
Hi Somename,

Thank you for this clarification. Now I understand the issue. This event was originally designed to be used with popup menus and here you can differentiate between keyboard, mouse or close called closing reasons. However, these conditions are not directly applicable for desktop alerts. In your scenario you can handle the MouseDown event for the close button. Here is a sample:
alert.Popup.AlertElement.CaptionElement.TextAndButtonsElement.CloseButton.MouseDown += new MouseEventHandler(CloseButton_MouseDown);
void CloseButton_MouseDown(object sender, MouseEventArgs e)
{
    //...
}

I hope this helps.
 
Greetings,
Jack
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
SomeName
Top achievements
Rank 1
answered on 27 Sep 2011, 11:46 AM
Thanks for this solution.

Can you already say if, in the future version, there will be the difference right from the RadPopupCloseReason in the closed method.
I think its rather common to want to distinguish those two.
0
Jack
Telerik team
answered on 30 Sep 2011, 01:55 PM
Hi,

Thank you for writing me back.

Currently, I cannot confirm that. We will consider a possible change in our API when planning our future version. However, you are the first one to request such a functionality and we may increase its priority when more people request the same.

Should you have any other questions, do not hesitate to ask.
 
Regards,
Jack
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
DesktopAlert
Asked by
SomeName
Top achievements
Rank 1
Answers by
Jack
Telerik team
SomeName
Top achievements
Rank 1
Share this question
or