On Apr 25, 2013, at 9:57 PM, Sabarish Sridhar <[email protected]> wrote:
> *self.Form.regIdOfGrid.DyanmicDataSource=functionthatreturnsdataset();*
> call the* update* method.
>
> For some reason it does not update.
When you set the Dynamic* properties, the value you set them to should
be a callable, which is then called every time an update() is received. In the
code above, it should simply be:
self.Form.regIdOfGrid.DyanmicDataSource=functionthatreturnsdataset
Note that the parens have been left off; in your code, though, you are
setting the dynamic prop to a dataset, which is not callable, and won't change.
> *self.Form.buildFromDataset(dataset)*-This works but it adds columns. I
> want to create a whole new grid and not append columns. I could not find a
> method to remove all columns. Otherwise this could be used after removing
> the columns.
This builds from the complete dataset, so it will include all columns
in that dataset unless you include the optional 'includeFields' parameter,
which should be a list of just the fields in the dataset which you want
displayed in the grid.
I should note that while both approaches will work, the first will be
much, much faster, since it isn't creating the grid each and every time the
form updates.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]