-Yep. That is right. I am coding the afterInit() method of the grid.(I thought it sounded right but then when you pointed it out I realized the error). I create the grid using the class designer and give it a regId and then modify the afterInit() method
> 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? -Well, I tried both and neither seemed to work.Yes. The returnData is defined for the grid and it returns the dataset correctly and I have confirmed that by printing the dataset. > 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. -The reason I decided to go with dynamic data source is because I have to select data from multiple tables. So I do a left join and then a union based on the users preferences and then display the returned data on the grid. Ideally the name of the columns shouldnt be changing. Only their contents. The reason I decided to delete the columns was because the update method did not work correctly and buildFromDataSet(dataset) did. -I have a list of preferences and once the user selects them I have a custom mysql query which I execute(It includes a left join and a union). This in turn returns a dataset which I would like to display on the grid. If the user double clicks on any element of the grid I open up a new tab with more information regarding the id of the device which the user clicked As Ed is suggesting it is difficult to help you without us understanding > your code. Maybe there is a reason you are not posting your code. Why not > create a test case and we can look at what you are doing and make > suggestions. -The only reason I havent posted my entire code was because I thought a short simple snippet relevant to the area which I am working on would help you guys understand where I am making a mistake quicker. The returnData() method returns the dataset correctly. I can print the dataset and hence have come to that conclusion. So now it would just be a matter of updating or inserting the dataset into the grid whose code I have posted. For the grid: *def afterInit(self):* *self.Form.smallGrid.DynamicDataSource=self.returnData;* * * *On the button click:* *self.Form.smallGrid.update()* * * Is there any other specific part that you would like me to post? I appreciate the time you guys are taking to help me out !! * * --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ 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/cak5s0b69jiqdwqeokuga4ra1pckqmptqcn7qbor3ykor0o5...@mail.gmail.com
