or
| Else ' -- Not Keys.Control, .Shift or .Alt |
| Select Case keys.KeyCode |
| Case Windows.Forms.Keys.Left |
| If Not .MasterGridViewTemplate.AllowEditRow Then |
| ' -- If Only One Row Selected |
| If .SelectedRows.Count = 1 Then |
| ' -- If Selected Row is Expanded |
| If .SelectedRows(0).IsExpanded Then |
| .SelectedRows(0).IsExpanded = False |
| Return True |
| Else |
| Dim oParentRow As GridViewDataRowInfo = .CurrentRow.ViewInfo.ParentRow |
| If oParentRow IsNot Nothing Then |
| .CurrentRow = oParentRow |
| 'oParentRow.IsExpanded = False |
| .SelectedRows(0) = .CurrentRow |
| .SelectedRows(0).IsCurrent = True |
| .SelectedRows(0).InvalidateRow() |
| .CurrentRow.InvalidateRow() |
| .CurrentRow.EnsureVisible() |
| .SelectedRows(0).EnsureVisible() |
| End If |
| Return True |
| End If ' -- Else Not (Selected Row is Expanded) |
| End If ' -- Only One Row Selected |
| ' -- Don't allow Column selection on Master Template |
| Return True |
| End If ' -- Not AllowEditRow |
| ' -- End Case Windows.Forms.Keys.Left |
| Case Windows.Forms.Keys.Right |
| If Not .MasterGridViewTemplate.AllowEditRow Then |
| If .SelectedRows.Count = 1 Then |
| .SelectedRows(0).IsExpanded = True |
| End If |
| Return True |
| End If ' -- Not AllowEditRow |
| ' -- End Case Windows.Forms.Keys.Left |
| End Select ' -- keys.KeyCode |
| End If ' -- Else Not Keys.Control, .Shift or .Alt |
| Public Sub CargarMarcas(ByRef cmbMarcas As Telerik.WinControls.UI.RadComboBox) |
| Using ta As New ArqBD.dsERPConfigTableAdapters.MARCASTableAdapter |
| Using dt As New ArqBD.dsERPConfig.MARCASDataTable |
| ta.Fill(dt) |
| cmbMarcas.DisplayMember = "Nombre" |
| cmbMarcas.ValueMember = "Identificador" |
| cmbMarcas.DataSource = dt |
| End Using |
| End Using |
| End Sub |
Note: I've tried the same code in form's load event and in a separate public module (as the sample), and in both cases it doesn't work. Is there something I'm missing? Thank you in advance