Good afternoon Team Telerik
I have a problem because the page SIlverL when ended of run, the new runtime add combobox column in RadGrid don´t show nothing But the combobox in column have the data relation with primary data in radgrid:
for this example, the databound column idCategoria contains origin id data. The combobox column added don´t show "nombreCategoria" for each row, but if I click in the cell of combobox column, it show the combobox with data to relate, with fields idCategoria and nombreCategoria.
How I find solution for this problem?
thanks for any help
Juan Pablo Díaz
Bogotá D.C. - Colombia
I have a problem because the page SIlverL when ended of run, the new runtime add combobox column in RadGrid don´t show nothing But the combobox in column have the data relation with primary data in radgrid:
Private Sub rgvRegistroTabla_DataLoaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles rgvRegistroTabla.DataLoaded
' *************************************************** 2011Ene17 JPDS
Dim m, d As String, p As Integer
m = "rgvRegistroTabla_DataLoaded)-" : d = "Entra" : p = 0
Dim columna As New GridViewColumn
Dim hayRelaciones As Boolean = False
Try
If sender.GroupCount > 0 Then
tipoAdicionCol = 0
End If
If tipoAdicionCol = 1 Then
'MessageBox.Show(m & vbCrLf & d & vbCrLf & p)
p = 10
' Lee las relaciones existentes y carga los datos de las tablas origen
If Not IsNothing(arrRelaciones(0)) Then
hayRelaciones = True
End If
If hayRelaciones Then
p = 25
Dim columnaCombo As New GridViewComboBoxColumn()
p = 50
For Each columna In rgvRegistroTabla.Columns
If columna.UniqueName = arrRelaciones(2) Then
p = 60 : columnaCombo.UniqueName = arrRelaciones(2).ToString & "2"
p = 70 : columnaCombo.Header = arrRelaciones(2).ToString
p = 80 : columnaCombo.DisplayIndex = columna.DisplayIndex
p = 90 : columnaCombo.Width = 80
p = 100 : columnaCombo.DataMemberBinding = New Binding(arrRelaciones(2).ToString) ' Primary Relation Field ex: idCategoria
p = 110 : columnaCombo.SelectedValueMemberPath = arrRelaciones(4).ToString ' Secondary Relation Field ex: idCategoria
p = 120 : columnaCombo.DisplayMemberPath = arrRelaciones(5) ' Secondary Show data field ex: nombreCategoria
End If
Next
p = 200 : rgvRegistroTabla.Columns.Add(columnaCombo)
' La siguiente asignación dá el origen de datos al combo: Tipo de dato asignado: IEnumerable(Of IDictionary)
' Example: Table: Categoria; Fields: idCategoria, nombreCategoria
p = 250 : DirectCast(rgvRegistroTabla.Columns(columnaCombo.UniqueName), GridViewComboBoxColumn).ItemsSource = GenerateData(tablaRel).ToDataSource
End If
End If
Catch ex As Exception
MessageBox.Show("Revisar: " & vbCrLf & m & p & vbCrLf & ex.Message)
End Try
End Sub
for this example, the databound column idCategoria contains origin id data. The combobox column added don´t show "nombreCategoria" for each row, but if I click in the cell of combobox column, it show the combobox with data to relate, with fields idCategoria and nombreCategoria.
How I find solution for this problem?
thanks for any help
Juan Pablo Díaz
Bogotá D.C. - Colombia