fix focus problem in search start
This commit is contained in:
parent
8e64ef1978
commit
0dd9788d8f
@ -223,15 +223,24 @@ Public Class ClassControlCreator
|
||||
|
||||
oMyNewGridControl.DataSource = oDTSource
|
||||
oView.PopulateColumns()
|
||||
oView.FocusInvalidRow()
|
||||
|
||||
oMyNewGridControl.RefreshDataSource()
|
||||
oMyNewGridControl.ForceInitialize()
|
||||
'oMyNewGridControl.RefreshDataSource()
|
||||
'oMyNewGridControl.ForceInitialize()
|
||||
|
||||
oWatch1.Stop()
|
||||
|
||||
Return oMyNewGridControl
|
||||
End Function
|
||||
|
||||
Public Sub DeselectGridControl(BaseControl As Control)
|
||||
Try
|
||||
DirectCast(DirectCast(BaseControl, GridControl).MainView, GridView).FocusInvalidRow()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function AddCheckBox(pIndexname As String, y As Integer, pVorbelegung As String, pCaption As String) As CheckBox
|
||||
Try
|
||||
Dim oValue As Boolean = False
|
||||
|
||||
@ -196,10 +196,10 @@ Public Class frmGlobix_Index
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SaveProfileItem_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SaveProfileItem.CheckedChanged
|
||||
My.UIConfig.Globix.ProfilePreselection = SaveProfileItem.Checked
|
||||
My.SystemConfigManager.Save()
|
||||
End Sub
|
||||
'Private Sub SaveProfileItem_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SaveProfileItem.CheckedChanged
|
||||
' My.UIConfig.Globix.ProfilePreselection = SaveProfileItem.Checked
|
||||
' My.SystemConfigManager.Save()
|
||||
'End Sub
|
||||
|
||||
Private Sub SkipItem_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SkipItem.ItemClick
|
||||
My.Database.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CURRENT_WORKFILE_GUID}")
|
||||
|
||||
@ -225,25 +225,16 @@ Public Class frmSearchStart
|
||||
Dim oMyControl As Control = Nothing
|
||||
If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
|
||||
oMyControl = oControls.CreateExistingGridControl(oAttributeRow, oXPosition, oYPositionControl)
|
||||
Dim myDGV As GridControl = CType(oMyControl, GridControl)
|
||||
Dim oGrid As GridControl = CType(oMyControl, GridControl)
|
||||
|
||||
Dim omyDTSource As DataTable = CType(myDGV.DataSource, DataTable)
|
||||
If Not IsNothing(omyDTSource) Then
|
||||
If omyDTSource.Rows.Count = 1 Then
|
||||
Dim oDataSource As DataTable = CType(oGrid.DataSource, DataTable)
|
||||
If Not IsNothing(oDataSource) AndAlso oDataSource.Rows.Count = 1 Then
|
||||
oSingleResult = True
|
||||
' AddSearchAttribute(oAttriID, oAttriTitle, omyDTSource.Rows(0).Item(oAttriTitle).ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim oView As GridView
|
||||
oView = CType(myDGV.MainView, GridView)
|
||||
Dim oView As GridView = CType(oGrid.MainView, GridView)
|
||||
|
||||
oMyLastGridView = oView
|
||||
If CBool(oAttributeRow.Item("MULTISELECT")) = True Then
|
||||
'AddHandler oView.SelectionChanged, AddressOf RenewSearchAttributes
|
||||
Else
|
||||
' AddHandler oView.FocusedRowChanged, AddressOf FocusedRowChanged
|
||||
|
||||
End If
|
||||
oView.FocusInvalidRow()
|
||||
|
||||
ElseIf oAttributeType = ATTR_TYPE_DATE Then
|
||||
@ -264,6 +255,10 @@ Public Class frmSearchStart
|
||||
|
||||
If oMyControl IsNot Nothing Then
|
||||
SelectedTab.Controls.Add(oMyControl)
|
||||
|
||||
If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
|
||||
oControls.DeselectGridControl(oMyControl)
|
||||
End If
|
||||
End If
|
||||
|
||||
oXPosition += oControlWidth + 20
|
||||
@ -311,10 +306,10 @@ Public Class frmSearchStart
|
||||
Dim octrlType = oControl.GetType.ToString
|
||||
Dim oAttrID As Integer
|
||||
Dim oAttrTitle As String
|
||||
Select Case oControl.GetType.ToString
|
||||
Case "DevExpress.XtraGrid.GridControl"
|
||||
Select Case oControl.GetType.FullName
|
||||
Case GetType(GridControl).FullName
|
||||
Dim oMyGridControl As GridControl = CType(oControl, GridControl)
|
||||
Dim oMyGridView As DevExpress.XtraGrid.Views.Grid.GridView = CType(oMyGridControl.MainView, GridView)
|
||||
Dim oMyGridView As GridView = CType(oMyGridControl.MainView, GridView)
|
||||
Dim oSelectedRows As Integer() = oMyGridView.GetSelectedRows()
|
||||
If oSelectedRows.Count = 0 Then
|
||||
Continue For
|
||||
@ -327,7 +322,7 @@ Public Class frmSearchStart
|
||||
Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {SEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{oResult}','{My.Application.User.UserName}'"
|
||||
My.DatabaseIDB.ExecuteNonQuery(oInsert)
|
||||
Next
|
||||
Case "DevExpress.XtraEditors.DateEdit"
|
||||
Case GetType(DateEdit).FullName
|
||||
' MsgBox("Date")
|
||||
Dim oDateEdit As DateEdit = CType(oControl, DateEdit)
|
||||
If ChangedDateControls Is Nothing Then
|
||||
@ -365,7 +360,7 @@ Public Class frmSearchStart
|
||||
End If
|
||||
Next
|
||||
|
||||
Case "System.Windows.Forms.CheckBox"
|
||||
Case GetType(CheckBox).FullName
|
||||
Dim myCheckBox As CheckBox = CType(oControl, CheckBox)
|
||||
If myCheckBox.CheckState <> CheckState.Indeterminate Then
|
||||
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user