Hello,I'm working with Infragistics.Win.UltraWinGrid.UltraGrid (Infragistics2.Win.UltraWinGrid.v11.1 version 11.1.20111.2050).How can i add row to grid manually?? When I run the statement uwgFicherosAdjuntos.Rows.Band.AddNew(), show me this error:'Not enough context to add a new row. Either a row in this band or the parent band has to be active to provide for enough context.'
Private Sub CargarFicherosAdjuntos() 'Dim row As Infragistics.Win.UltraWinGrid.UltraGridRow Dim i As Integer = 0 'uwgFicherosAdjuntos.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.Yes 'Infragistics.Win.UltraWinGrid.AllowAddNew.FixedAddRowOnTop For Each e As ZipEntry In files_zip uwgFicherosAdjuntos.Rows.Band.AddNew() 'uwgFicherosAdjuntos.DisplayLayout.Bands(0).AddNew() uwgFicherosAdjuntos.Rows(i).Cells(0).Value = e.Name 'nombre del fichero uwgFicherosAdjuntos.Rows(i).Cells(1).Value = Math.Round(e.Size / 1024, 2) 'tamaño del fichero i += 1 Next End Sub Please, can you help me?Thanks in advance
My first guess would be that you are trying to add a row to a grid that has no DataSource. Have you set a DataSource on the grid? If so, then it would make more sense to add the rows to the DataSource before you bind it to the grid rather than adding rows through the UI.