Morris,
 
So sorry that I am currently unable to give you detailed examples of my own since I am debugging a critical error to solve soon.
 
But you can try to learn controlling grid on the fly from form 'SysTableBrowser' and also its class 'SysTableBrowser' (examine method run). This form is called when you click 'Table browser' via AOT's context menu or from SQL Administration in MainMenu -> Administration -> Periodic -> SQL Administration.
 
Alternatively try temp table. Temporary table is initially blank thus the values need to be filled in. Suppose you have created a new temporary table called tmpTableNew (don't forget to set 'temporary' property to 'Yes' in Table properties), with field someId (string 10) and field someName (string 100). Put this new table in your form datasource. In the 'init' method of your form, fill in the temporary table:
 
void init()
{
    super();
 
    // just a sample, remember after super()
    tmpTableNew.someId = 10;
    tmpTableNew.someName = 'Morris';
    tmpTableNew.insert();
 
   // you can try to build the content from other methods or tables
   // from a line below, method getSomeId might retrieve the Id from another table,
   // or even call other external methods
   // tmpTableNew.someId = getSomeId();
   // tmpTableNew.insert();
 
   // or maybe you have created the temp data building routine in other class method,
   // static method, or table method, so you can simply call it from here
   // tmpTableNew.buildTempData()
   // or maybe
   // TmpTableNew::buildTempData()
}
 
Besides form's 'init' method, you can also call the routine for temporary data building from other methods such as from data source's 'init' method, 'executeQuery' method (before super()), etc.
 
Regards,
 
-Aji Sarosa-

 
Morris Mendoza <[EMAIL PROTECTED]> wrote:

Aji,

Im quite new to Axapta so i don't know how to use the
FormBuildGridControl. Any examples? Also, how can you add records
using a temporary in the 'init' method of my form? Thanks!

Best Regards
Morris


--- In [EMAIL PROTECTED], Aji Sarosa
<[EMAIL PROTECTED]> wrote:
> Hi,

> Try to use class FormBuildGridControl. By using this class you can
set the datasource and even control the grid on the fly (at run
time). Or you can try to use temporary table, bind it in your form's
datasource, and in 'init' method of the form you can build the
content of your temporary table.

> Regards,

> -Aji Sarosa-
>
>
> Morris Mendoza <[EMAIL PROTECTED]> wrote:
>
> Im using a Grid for display a list of my records. However these
> records do not exist in the datasource binded to my form. How can i
> display these records in my grid when my form loads? Btw, Im using
a
> COM object to retrieve these records from an external source.
Thanks!
>
>
>
>
>
> Sharing the knowledge on Axapta.
>
>
> Yahoo! Groups SponsorADVERTISEMENT
>
>
> ---------------------------------
> Yahoo! Groups Links
>
>    To visit your group on the web, go to:
> http://groups.yahoo.com/group/Axapta-Knowledge-Village/
>  
>    To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>  
>    Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>                  
> ---------------------------------
> Do you Yahoo!?
>  Check out the new Yahoo! Front Page. www.yahoo.com





Sharing the knowledge on Axapta.



Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com

Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to