Appending rows to a Grid whose data source is a Temporary table


void method()
{
    Table origTable, newTable;
;

 // Copy original contents
    for ( origTable = Table_DS.getFirst(); 
         origTable; 
         origTable =  Table_DS.getNext())
    {
         newTable.clear();
         newTable.BOMId =  origTable.BOMId;
         newTable.ItemId =  origTable.ItemId;
         newTable.ItemName =  origTable.ItemName;
         newTable.ziMessage =  origTable.ziMessage;
         newTable.insert();
    }
// Append new record data
     newTable.clear();
     newTable.BOMId = "test2";
     newTable.ItemId = "test2";
     newTable.ItemName = "test2";
     newTable.ziMessage = "test2";
     newTable.insert();

    Table.setTmpData( newTable);

     Table_DS.executeQuery();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.