Cannot set active tab no matter what i do
Thank you for contacting Syncfusion Support.
We have checked the reported query "No matter what the new tab is created and I can select it manually but it is never activated / focused when added" and we were unable to reproduce the reported behavior in our DockingManager control. But we have prepared the sample to meet your requirement. In this sample, we have set ActiveWindow of DockingManager as Newly added child. Please download the sample for the same from the below link.
Sample: Docking_SelectTab
Note: In our DockingManager control set’s active tab as newly created child by default.
If we have misunderstood your requirement, please provide EssentialStudio version and issue reproducible sample with replication steps. It will help to proceed further on this.
Regards,
Marimuthu S.
Hi
Thank you very much for your response. I have changed my code a little bit to help me figure out where it is going wrong. The sample you provided is pretty much exactly how i had it and it works perfectly. The only difference was the way in which the method was called. Your sample was on button click. The way i was calling this method was from a DataGrid_MouseDoubleClick event and I've discovered this is where the issue lies.
If i keep double clicking sometimes it activates the new tab, it all seems to be about timing. Perhaps the second click is overriding focus or similar I'm really not sure. I added a button to the grid row to run the exact same method and it works every time. It just does not like being called (or should i say its temperamental) from the DataGrid DoubleClick event.
Do you have any suggestions on why that could be?
Thanks for your update.
We have checked your query and we could reproduce the reported behavior. In our DockingManager, we have changed the SelectedItem while MouseDown on TabItem content. In your scenario, you have double clicked on DataGrid control, to add new DocumentTab. It triggered the MouseDown event of TabItem Content after new Document Tab was added. So, Active Document was changed from newly added Tab to last previous SelectedItem. So, this issue occurs from your side. Now, we have prepared the sample to meet your requirement. In this sample, we have handled the MouseDoubleClick Event of DataGrid to cancel the MouseDown event of TabItem content. Please download the sample for the same.
Sample: modified_Docking_SelectTab
If, we have misunderstood your query please provide more details with your sample codes. It will help to proceed further.
Regards,
Marimuthu S.
Hi,
Thank you!
It was as simple as that, much appreciated ;)
Thank you for your update.
We are glad to know that, your reported behavior has been resolved. Please let us know if you need any further assistance, we will be happy to assist you.
Regards,
Marimuthu S.
- 5 Replies
- 2 Participants
-
PB Phill Barnes
- Aug 8, 2017 05:58 PM UTC
- Aug 14, 2017 11:24 AM UTC