Bug Report T155876
Visible to All Users

Programmatically assigning a View to the grid's FocusedView property doesn't focus the View's site

created 11 years ago

Dear Devexpres,

Please try the attached sample application.

I wrote a small code, if the user double clicks on a row ofa grid's first gridview, it switches to the second gridview. (To show somethingdetailed information. It's working ok.)
The strange thing is with the barmanager button. If you pushthe button, I wrote a small messagedialog, and after closing this dialog, thegrid switches back to the first gridview… ???
It happens only if I duoble click on the grid to use my codeto switch to the 2nd grid, and after that I push the barmanager button, whilethe grid is in the 2nd level.
It does not switches back, if I use the grid's top leveltabs to switch to the 2nd gridview (instead of double clicking), and I use thebarmanager button.
And also it does not switches back, if I use the doubleclick, I use the standartd Tcxbutton (instead of the barmanager) on the form.

It's very strange. I tried to hunt down the reason, the callstack shows this :

Unit303.TForm303.grd_gridFocusedViewChanged($3ACC850,$3A34B80,$3A33D20)
:007e7349 TcxCustomGrid.FocusedViewChanged + $41
:007fc0d3 TcxCustomGridView.SetFocused + $1F
:006970f4 TcxControl.WndProc + $1A8
:007f87b3 TcxGridSite.WndProc + $33
System.Classes.StdWndProc(469554,7,469692,0)
:75c962fa ; C:\Windows\syswow64\USER32.dll
:75c96d3a USER32.GetThreadDesktop + 0xd7

I tried with Delphi XE4, XE5, works the same way.

Comments (1)
DevExpress Support Team 11 years ago

    Hello Levente,

    We will examine your sample, but it can take some time. We will get back to you once we have any results or need additional information. Thank you for your patience.

    Answers approved by DevExpress Support

    created 11 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.