We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridTreeControl Seems to Steal Focus

Thread ID:





114929 Dec 13,2013 10:35 PM UTC Dec 18,2013 10:33 AM UTC WPF 1
Tags: GridControl
Joshua Cauble
Asked On December 13, 2013 10:35 PM UTC

No matter what I do it seems that the GridTreeControl steals focus.  

What I'm doing is in the DoubleClick of the grid is the following:

              Point p = e.GetPosition(this.myGrid);
                var cell = this.myGrid.InternalGrid.PointToCellRowColumnIndexOutsideCells(p, false);

                if (cell.RowIndex > 0 && cell.ColumnIndex > 0 && myGrid.InternalGrid != null)
                    GridTreeNode selNode = myGrid.InternalGrid.GetNodeAtRowIndex(cell.RowIndex);
                    if (selNode != null && selNode.Item is MyRecordData)
                        MyRecordData dfo = selNode.Item as MyRecordData;
                        if (dfo != null)
                            VM.SelectedRecord = dfo;

                if (VM.SelectedRecord != null)
                       MyNewForm frm = new MyNewForm(VM.SelectedRecord);

I am doing this as I may have to travers to find a parent node if a child is selected to get to the correct detail form.  However for now I have kept it simple.  

Whenever I doubleclick to open my form the form ALWAYS opens behind my current form. I have tried focus events, activate items, all kinds of settings on both forms and it always opens behind.  

I cannot make this a dialog as they can double click on multiple records in the source screen and open the details for many records.  

Any help?  If I exectue from a button vs doubleclick it works fine.  Every time.  but double click just seems to steal the focus.  

And while I have this issue in the WPF control I have seen it in previous versions of the grid control for winforms too, as far back as syncfusion version 5.   


Shakul Hameed M [Syncfusion]
Replied On December 18, 2013 10:33 AM UTC

Hi Joshua,


Thanks for contacting Syncfusion.


We have analyzed your query and we can achieve your requirement by setting the owner for the form loaded.

Please refer the following code snippet.


Code Snippet:[C#]

if (VM.SelectedRecord != null)


                MyNewForm frm = new MyNewForm();

                frm.Owner = this;





I have prepared the sample based on your requirement and please find the  attached sample.


Please let us know, if you have any query.



Shakul Hameed



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon