Browse Dialogue loses focus


Author
Message
Andrew Harper
Andrew Harper
StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi,

Our users are reporting an intermittent anomaly in our application that I have seen but am unable to reproduce consistently. We have a number of enquiry forms that present the contents of a BO in a DevExpress grid.

The BO is populated via a browse dialogue on the enquiry form. Occasionally when the user clicks search in the browse dialogue the browse dialogue form disappears when the search completes and the "Searching..." wait window is removed. When the user then clicks on the form with the grid and the browse dialogue button, the browse dialogue window reappears populated with the results of the search.

Just wondering if anyone else had come across this behaviour and if so how to prevent it?

Our application uses a data driven menu system that uses a tree control to display only the menu options applicable to the current user. The strataframe forms are then run as child mdi forms via reflection when the menu option is clicked.

TIA,

Andy









Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Andrew,
I have not used the Browse Dialog (BD) in a long time, but my guess is that the BD is going behind your form during the search instead of staying as the TOP window.

I have one form with a DevExpress grid in which I use the BD and have not seen the behavior you are experiencing.  Make sure you have the most recent version of SF 1.7.7.1.

Can you post the code you are using to show your BD?  Here is mine:

Private
 Sub AdvanceSearch()

     '-- Show the browse dialog
     If Me.SalesReceiptBrowseDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
         If Me.GridViewTransactionList.GridCustomCheckMark IsNot Nothing Then
             Me.GridViewTransactionList.GridCustomCheckMark.ClearSelection()
         End If

         Dim selectedPKValue As Integer = Me.bizvTransactionsList.PK_Transactions
         Dim startSelectedDateValue As Date = Me.bizvTransactionsList.ReceiptDate
         Dim endSelectedDateValue As Date = Me.bizvTransactionsList.ReceiptDate
         '-- When doing a search, set the date range to the date of the selected transaction
         With Me.DateRangeSelectorSalesReceipt
             '-- If the range selected is already custom, let's set it for Today to avoid error when
             '   setting the values of the individual date range
             If .RangeSelectedValue = UI.Windows.Forms.DateRangeSelectorControl.PreDefinedDateList.Custom Then
                 .RangeSelectedValue = -1 ' UI.Windows.Forms.DateRangeSelectorControl.PreDefinedDateList.Today
             End If
             .StartSelectedDateValue = startSelectedDateValue
             .EndSelectedDateValue = endSelectedDateValue
             .RangeSelectedValue = UI.Windows.Forms.DateRangeSelectorControl.PreDefinedDateList.Custom

             '-- Get the data
             Me.GetTransactionListData()
             Me.bizvTransactionsList.NavigateToPrimaryKey(selectedPKValue)
         End With
         Me.Cursor = Cursors.WaitCursor
         LoadAllDataForTransaction(selectedPKValue, True)
         Me.BizTransactions1.SaveCurrentDataTableToSnapshot("EDIT_RECORD")
         Me.BizTransactions1.Edit()

         '-- When edit, show only Active Records.
         Me.RefreshLookupData(LookupRefreshType.Both)

         '-- Ensure that the editor page is active
         Me.pmMain.SetActivePage(Me.PageEditor)

         '-- For some reason the control is only refreshed when the PageEditor is visible.
         Me.CustomerNameSelectedValue = Me.BizTransactions1.FK_InsuredCustomer
         Me.Cursor = Cursors.Default
     End If
 End Sub



Edhy Rijo

Andrew Harper
Andrew Harper
StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi Edhy,




Thanks for your reply.




<<Hi Andrew,
I have not used the Browse Dialog (BD) in a long time, but my guess is that the BD is going behind your form during the search instead of staying as the TOP window.>>


Agreed - the BD would appear to be going behind the form when the BD Search completes but before the BD results are displayed. This is what we are seeing but the behaviour is not consistent. I am still trying to identify the sequence of events that causes the BD to 'disappear'.

<<Make sure you have the most recent version of SF 1.7.7.1.>>

I am using 1.7.7.1

<<Can you post the code you are using to show your BD?>>

We are firing the BD via the Browse button on a MaintenanceFormToolStrip. All the other standard buttons (Add, Edit etc) have the Include...Button property set to false. 

I will try firing the BD from a button directly on the form.




Best regards, Andy
Andrew Harper
Andrew Harper
StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi,

I just found topic http://forum.strataframe.net/Topic29659.aspx that references this issue despite previous searches. This suggests that setting the BD property ForceWindowTopMost to true resolves this issue. I will make this change and test,

Andy



Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Andrew,

Yeap, that make sense, this property should take care of your issues.

Please let us know.

Edhy Rijo

Edited 10 Years Ago by Edhy Rijo
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search