The following code works fine in 2.13 on Ubuntu 9.04 i386 and correctly dispays the last line of the result in gridview gvAll
On 2.99 2224, however, the last line is not displayed or not fully displayed. You have to scroll to show the last line. I thought it might have something to do with the header but is the same whether the header is on or off. It is also unaffected by the .mode of the gridview. '----------------------------------------------------------------------- PUBLIC sqlAll AS String PUBLIC resAll AS Result 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PUBLIC FUNCTION showall() gvAll.Clear sqlAll = "select t_number as Trans,t_supcode as Supp, t_invno as Ref, t_date as Date,t_drcr as DrCr, t_net as Net, t_vat as Vat, t_datedue as Due from accTrans order by t_number" resAll = mdFile.$hConnStock.Exec(sqlAll) gvAll.Rows.count = resAll.count gvAll.row = resAll.count - 1 'should take gridview to last line <-------- END 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PUBLIC SUB gvAll_Data(row AS Integer, Column AS Integer) resAll.MoveTo(row) gvAll.Data.text = Str(resAll[gvAll.Columns[column].text]) END '---------------------------------------------------- PUBLIC SUB Form_Open() ME.center mdFile.flOpen gvAll.Rows.count = 1 gvAll.Columns.count = 8 gvAll.Columns[0].text = "Trans" gvAll.Columns[0].width = 45 gvAll.Columns[1].text = "Supp" gvAll.Columns[1].width = 45 gvAll.Columns[2].text = "Ref" gvAll.Columns[2].width = 55 gvAll.Columns[3].text = "Date" gvAll.Columns[3].width = 55 gvAll.Columns[4].text = "DrCr" gvAll.Columns[4].width = 40 gvAll.Columns[5].text = "Net" gvAll.Columns[5].width = 55 gvAll.Columns[6].text = "Vat" gvAll.Columns[6].Width = 55 gvAll.Columns[7].text = "Due" gvAll.Columns[7].width = 55 showall END '----------------------------------------------------------------------- mdFile is just a module which opens the database. Is this a bug? rgds -- View this message in context: http://www.nabble.com/Gridview-not-moving-to-last-line-in-Gambas-3-tp24935036p24935036.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
