ms2
This commit is contained in:
@@ -122,7 +122,6 @@
|
||||
' Als letztes setzen wir die DataSource
|
||||
control.DataSource = dt
|
||||
control.EndUpdate()
|
||||
|
||||
sw.Stop()
|
||||
' Console.WriteLine("SetDataSource for {0} took {1}ms", control.Name, sw.ElapsedMilliseconds)
|
||||
End Sub
|
||||
@@ -533,12 +532,16 @@
|
||||
|
||||
Public Shared Sub LoadValue(control As DevExpress.XtraGrid.GridControl, values As List(Of Object))
|
||||
Dim gridview As DevExpress.XtraGrid.Views.Grid.GridView = control.MainView
|
||||
Dim focused As Boolean = False
|
||||
For i As Integer = 0 To gridview.RowCount - 1
|
||||
Dim fieldName As String = gridview.Columns(0).FieldName
|
||||
Dim rowhandle As Integer = gridview.GetRowHandle(i)
|
||||
Dim rowvalue As String = gridview.GetRowCellValue(rowhandle, fieldName)
|
||||
|
||||
If values.Contains(rowvalue) Then
|
||||
If focused = False Then
|
||||
gridview.FocusedRowHandle = rowhandle
|
||||
focused = True
|
||||
End If
|
||||
gridview.SelectRow(rowhandle)
|
||||
End If
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user