johnf wrote:
> 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.
I'm not seeing this. Please run the new tutorial in
dabodemo/tutorial/dbEditableGrid.py and verify that when you click the
button, the DataSet has the correct values.
> 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.
No, that doc is poorly written or misunderstood. The DataSet property
becomes read-only if you set the DataSource property. But if you query
DataSet it'll have the current values.
> So again how do I read the current values of the frid data cursor???
I think you have it right, but something else in your app is getting in
your way. Please run my new tutorial to verify that it works for you,
then study the code which may help highlight the differences, and let us
know what you find out!
> Below I'm
> using a for loop which just seems wrong.
Ick.
--
pkm ~ http://paulmcnett.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]