On Apr 26, 2013, at 9:50 PM, Sabarish Sridhar <[email protected]> wrote:

> My init method of the grid:
> *def afterInit(self):*
> * self.Form.smallGrid.DynamicDataSource=self.returnData;*
> 
> returnData returns a cursor dataset. When a button is clicked I do the
> following:
> 
> *self.Form.smallGrid.update();*
> My grid doesnt update at all. What am I doing wrong?

        OK, I'm a little confused, so let's keep it simple: assume that there 
is nothing but the form and the grid. Now you say you have the afterInit() 
defined in the init of the grid? I'll assume that that's a typo, and you're 
simply coding the afterInit(). 

        Now in the afterInit code, 'self' would refer to the grid, correct? 
Then is that the same thing as 'self.Form.smallGrid'? Why not just write 
'self.DynamicDataSource'? And is the 'returnData' method defined for the grid?

        More fundamentally, are your data sets changing their structure, or 
just their content? The only reason you would ever need something like 
DynamicDataSource is when the grid is going to be displaying data from several 
sources, rather than a source (such as a bizobj) whose data will be changing as 
the result of user searches, etc. And the only time you would ever need to 
delete and re-build the column structure would be if the structure of the data 
is changing; i.e., unrelated data sets with different fields.

        It's difficult to advise you on the the best approach without 
understanding your particular use case. Can you explain in a little more detail 
what parts of your data are changing, and how they change?


-- 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]

Reply via email to