Hello, I need some help. I'm developing an application for Android tablets, and I'm using SD_FlexGrid. The system is working, but I occasionally get an error: "Refresh: java.lang.IndexOutOfBoundsException: Index: 20, Size: 0" when I try to load new data into the Grid (I clear the existing grid and want to fill it with new data). What could be the cause of this? Please help; the code for refreshing the grid is here:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
System works correctly, I received just in log following msg: Refresh: java.lang.IndexOutOfBoundsException: Index: 20, Size: 0
What can be wrong? Or should I just ignore this message?
Thank you...
Darko
			
			
			
				Example:
			
		
		
		            ' clear existing selection
            tblNalogiNovi.ClearSelection
            ' clear all existing rows
            tblNalogiNovi.ClearRows
            Query = $"select wo.WoID as wo,
                             jo.JobID as job,
                             jo.Title as title,
                             jo.StatusName as statusname,
                             jo.CustomerName as customer,
                             wo.Lenght as dolzina,
                             wo.Width as sirina,
                             wo.ProductName as productname,
                             wo.MaterialName as materialname
                      from DiLiteWorkOrders wo inner join DiLiteJobs jo on jo.JobID = wo.JobID
                      where not exists(select * from DiLiteTransactions ac where ac.WoID = wo.WoId) and
                                  (exists(select * from DiLiteTasks tk where tk.WorkOrderID = wo.WoId and (lower(tk.Operation) = lower('${IzbranaOperacija}') or lower('${IzbranaOperacija}') = 'vse operacije')))
                      order by wo desc"$
            Dim rs As ResultSet = comDb.SqlLite.ExecQuery(Query)
            
            ' while records existing
            Do While rs.NextRow
                Dim Kvadratura As String = rs.GetString("dolzina") & "x" & rs.GetString("sirina")
                tblNalogiNovi.AddRow(Array As Object(rs.GetInt("job"), rs.GetInt("wo"), rs.GetString("title"), rs.GetString("statusname"), rs.GetString("customer"), rs.GetString("dolzina"), rs.getstring("sirina"), Kvadratura, rs.GetString("productname"), rs.GetString("materialname")), True)
            Loop
            If rs.RowCount <> 0 Then tblNalogiNovi.Invalidate
            rs.Close
        
            ' color odd lines
            Dim Num As Int = 1
            For x = 0 To tblNalogiNovi.RowCount - 1
                If Num Mod 2 == 0 Then
                    tblNalogiNovi.SetRowCustomize(x, xui.Color_Black, B4XPages.MainPage.ColorLG, xui.CreateDefaultFont(15))
                End If
                Num = Num + 1
            Next
	System works correctly, I received just in log following msg: Refresh: java.lang.IndexOutOfBoundsException: Index: 20, Size: 0
What can be wrong? Or should I just ignore this message?
Thank you...
Darko