> On Monday 23 April 2007 07:27, [EMAIL PROTECTED] wrote:
> > I've tried to add the author grid from the dataenvironment. But
> the only
> > available layout options are single record style! So discarding this
> > approach I placed the grid myself, setting the DataSource
> property = author
> > and the DataField property of the only column = authorname. But this
> > doens't work either (note: I did create the an authorBizobj in the
> > createBizobjs form method). I've followed the pattern that Dabo
> seems to
> > have used in Page 1 book Grid. Although there's something I find
> strange:> The name of the connection is "bookdb" and Dabo sets the
> DataSource> property to "book" both in the ClassDesigner and in
> the BookBizobj it
> > created!?
> The connection name is normally different than the DataSource.
I see what you mean! The Bizobj gets the connection as an arg in the
constructor and the table is defined in the it's DataSource property.
> You have created the grid and set the DataSource and DataFields.
> Now there is
> one more step. You have to get the data from the bizobj. The
> easy way is to
> do the following:
>
> myBizobj = self.Form.getBizobj('tableName')
> The above statement will get the bizobj for the tableName. Where
> tableName is
> the name of your table (Authors I think)
>
> Next you have to populate the grid dataset;
>
> GridName.DataSet = myBizobj.getDataSet()
> then you might want to refresh the grid
> GridName.refresh()
>
> That should provide a start.
> --
> John Fabiani
I see what your code is doing. So here's what I have done:
In the form's afterInitAll() definition:
def afterInitAll(self):
self.requery()
# populate the author grid
authorBizobj = self.getBizobj('author')
# taking advantage of RegID's
self.grdAuthorLst.DatSet = authorBizobj.getDataSet(fdls=('authorname',))
self.grdAuthorLst.refresh()
The author bizobj is correctly defined! I did clean-up the Grid DataSource and
the Column DataField properties in the designer (as per docs indication it's
only possible to set the DataSet property if the DataSource prop is not set).
But this is not working.
BTW. I was trying to set the properties via designer supposing that the Grid's
DataSource and the Column's DataField would be enough to get the grid populated.
Thanks,
Miguel
_______________________________________________________________________________________
Sabe qual e o credito pessoal MAIS FACIL DE PAGAR no futuro?
Aquele em que as PRESTACOES DESCEM ao longo do emprestimo?
Saiba mais em: http://www.iol.pt/correio/rodape.php?dst=0704171
_______________________________________________
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]