Ed Leafe wrote:
> Just create the data, populate the grid, show the dialog, and after
> the user makes their selection, hide the dialog, grab their selection,
> release the dialog, and then proceed with your app based on their
> selection. No databases, no bizobjs, no saving, no connections - keep
> it simple!
>
I followed your advice and now everything is working.
I don't understand something though. In the onHit code of the button
that updates the grid (see below), every time I add a row to the DataSet
I have to bind it again to the grid (issuing :
self.Form.grdCondiciones.DataSet = self.Form.DataSet) or the grid will
not show the new row. And if I add the row to
self.Form.grdCondiciones.DataSet (and do no re assignment) the new row
will replace the old one (so I always have one row).Why would that be?
----------------------------------------------------------------
def onHit(self, evt):
if self.Form.dDateTextBox.Visible :
valor = self.Form.dDateTextBox
elif self.Form.dEditBox.Visible :
valor = self.Form.dEditBox
elif self.Form.dListBox.Visible :
valor = self.Form.dListBox
if self.Form.DataSet :
self.Form.DataSet = self.Form.DataSet.execute("""
insert into dataset
(campo,
operador, valor)
values (?, ?, ?)"""
,
(self.Form.drpCampo.Choices[self.Form.drpCampo.Value]
,
self.Form.drpOperador.Value
, valor.Value))
self.Form.grdCondiciones.DataSet = self.Form.DataSet
else :
self.Form.DataSet = dabo.db.dDataSet((
{'campo':self.Form.drpCampo.Choices[self.Form.drpCampo.Value]
,
'operador':self.Form.drpOperador.Value
, 'valor':valor.Value}, ))
self.Form.grdCondiciones.DataSet = self.Form.DataSet
self.Form.grdCondiciones.refresh()
------------------------------------------------------------------------
_______________________________________________
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/[email protected]