John, I fixed this issue by using a virtual field for the grid.
FYI (to others), John and I were using a cursor defining a field as ..."(0 as boolean) as lselected", in an execute statement to create a temporary column so that the user could select one or more records to process. I am guessing that when we issued a getDataSet command trying to selected the records, it was just re-issuing the "0 as boolean" vs looking at the current value. Larry Long -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of johnf Sent: Monday, August 13, 2007 1:40 PM To: Dabo Users list Subject: Re: [dabo-users] data in a grid On Monday 13 August 2007 07:06, johnf wrote: > Hi, > > Is there a simple way of accessing the grid cursor to retrieve the > changed data. > > Example: I populate a grid from a DataSource. The grid is Editable. I > make changes to the data in grid - a boolean column. Is there a simple > way to retrieve the all records where the boolean column is True? > > I thought I could use something like: > Grid.DataSet.execute("Select * from dataset where lSelected = 1") but > it appears to get the old data. In the doc's for dGrid: If DataSource is defined, DataSet is read-only and returns the dataSet from the bizobj This is why my SQL statement returns old values and not the grid values. So again how do I read the current values of the frid data cursor??? Below I'm using a for loop which just seems wrong. I'm currently using: moveds=self.distgridID.DataSet moveqty=0 movedqty=0 baltomove=self.qtytomovepgf.BaseValue for myitem in moveds: oktouse=False for key, value in myitem.items(): if key == 'nqty': myqty = value if key=='lselected' and value==1: oktouse=True if key=='clocation': myloc=value if oktouse: nqty=myqty moveqty=min(baltomove,nqty) if moveqty>0: o.new() o.setFieldVal('clocation',myloc) o.setFieldVal('nqty',-moveqty) o.setFieldVal('ntransid',invtransno) baltomove=max(baltomove-moveqty,0) movedqty=movedqty+moveqty if baltomove==0: break -- John Fabiani [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
