Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4028
Determining how an UltraDropDown was closedup
posted

In my project, I need to know how a user closed up an UltraDropDown control. I beleive there are 3 different scenarios:

1) The user selected an existing row.

2) The user canceled (Pressed escape, or clicked on the little arrow a second time)

3) The user left the control (tabbed or clicked away) without closing the dropdown. 

As far as I can tell, there is no property within the DropDown for telling me this.

I have managed to come up with a method to distinguish between options 1 and 2 - Basically, I keep a track of what the last key pressed was, and a track of where and what mouse button was clicked last, so when the UltraDropDown is closedup, I can just look at those to determine what the user did (enter means they selected something, escape means they changed their mind, and also by looking at where the last click was). This is all done within the dropdown control itself (all dropdown events involved).

But point 3 is proving to be tricky. I cant seem to find the right sequence of events/properties to determine this.

If someone could shed some light, or even give me a hint, on how to do this, it would be much appreciated. 

Parents
  • 1140
    posted
    have your tried putting the following into the mouse down event?

    Point pt = new Point(e.X, e.Y);

    .ActiveRow.GetUIElement().PointInElement(pt);

     

Reply Children
No Data