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

Gridview taking focus on context menu close

3 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 25 Mar 2013, 05:23 PM
Hello.
I am using the context menu in the GridView and under some circumstances displaying a Popup to the user.  When I do this I see focus being placed on the user control within the Popup but it immediately leaves.  The focus is being placed back onto a cell.  My attempts to intercept this have failed.  Is there some mechanism or pattern available to resolve this?

I am using the same pattern from within the ChildHierarchyTemplate the focus remains on the user control within the Popup.

Thank you

Paul

3 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 28 Mar 2013, 01:55 PM
Hello Paul,

In order to investigate and resolve the problem, would it be possible to share with us more details on your exact implementation? Moreover, could you test your solution with binaries from our latest official release - version 2013.1.0220? If you get the same result, please try isolating the problem in a sample runnable project. We will check what is going on and will assist you further.

Thank you in advance.

Kind regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Paul
Top achievements
Rank 1
answered on 28 Mar 2013, 07:28 PM
I have created ticket 676477 as per your reqeust.

Thanks

Paul
0
Rosen Vladimirov
Telerik team
answered on 01 Apr 2013, 08:16 AM
Hi Paul,

We've already answered to your support ticket, but I'm pasting my answer here as well, so if anyone else have the same problem, they could take a look at this solution.

The problem is not caused by RadContextMenu or RadGridView. It is dedicated to the way you are trying to open the Popup. First of all you say that you want to close RadContextMenu and open the popup. In this case I suggest you to open the popup on RadMenuItem Click. When RadMenuItem is clicked, it will automatically close RadContextMenu. You can also close it manually by setting IsOpen property to false. In your case you are using buttons inside RadMenuItem and they are handling the Click event. So it doesn't reach RadMenuItem and this way RadContextMenu is not closed.
For your other problem - in my opinion there are two ways:
- put TextBox directly as a child of the popup.
- put UserControl as a child of the popup.
Both ways will have similar code. I'm sending you a project how to achieve the desired functionality (I've used UserControl as a child of the popup).

Hopefully this helps.

All the best,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Paul
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Paul
Top achievements
Rank 1
Rosen Vladimirov
Telerik team
Share this question
or