On Mar 3, 2007, at 5:32 AM, Julian Rendell wrote:
> * 4. Make clicks on rows in the data-grid update the view form with
> that
> row's contents (Erg- help please...)
That should happen automatically. The grid raises a RowNumChanged
event that the form should respond to. If not, you can create an
onRowNumChanged method that will handle that event, and call the
form's update() method.
> * 5. I Need to add a new column to the grid. This would be a
> 'reschedule' checkbox. It won't come from the database; it needs
> to be
> stored (preferably as part of the associated row) in the interpreter.
> (Help please- how to add/store this field, and how to make it a check
> box in the grid cell)
Paul is probably a better source for this info, as he recently added
this feature and I haven't had a chance to play around with it. The
bizobj property is 'VirtualFields', and you can use it to define
mapping of these derived fields and the functions that generate their
values.
You then need to edit the grid to add a column whose DataField is
this virtual field.
> * 6. Add a new page with a new grid, just containing the rows with
> 'reschedule' checked. There will need to be some other drop down
> lists
> with some selectable parameters.
You could do this with a little Dabo magic. The datasets themselves
understand SQL, so you could do something like this:
allData = biz.getDataSet()
reschedData = allData.execute("select * from dataset where reschedule
= 1")
...assuming that 'biz' is your main bizobj. You can then call the new
grid's buildFromDataSet(), passing the 'reschedData' dataset.
> There needs to be a submit button- onHit, it will need to get all the
> data from the grid where reschedule=true, combine with the current
> value
> of the drop-down lists mentioned in 5, and then create new rows in the
> database; custom SQL will probably be the easiest... (Help please,
> where
> do I start on this point?!)
This is hard to say without knowing more about the app. But keep in
mind that datasets are tuples, so you could get all the rescheduled
records in a dataset by using a query like the one above, or simply:
[rec for rec in biz.getDataSet()
where rec["rescheduled"] == 1]
I hope this give you enough to get started...
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users