On Aug 13, 2007, at 1:39 PM, johnf wrote:
> 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.
I've tried editing grid cells, and the DataSet always reflects the
current state of the data. Once you edit a cell, the change is
propagated back to the bizobj, so there's no way that you could still
have 'old' data in the bizobj's DataSet.
> 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've taken the liberty of writing it in a more Pythonic and Daboic
(?) manner. Let me know if this isn't clear.
movedqty=0
baltomove=self.qtytomovepgf.BaseValue
selRecs = [(rec["nqty"], rec["clocation"])
for rec in self.disgridID.DataSet
if rec["lselected"] is True]
while baltomove:
for selRec in selRecs:
qty = min(baltomove, selRec[0])
if qty:
o.new()
o.setFieldVal("clocation", selRec[1])
o.setFieldVal("nqty", -1 * qty)
o.setFieldVal("ntransid", invtransno)
baltomove -= qty
baltomove = min(baltomove, 0)
movedqty += qty
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
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]