"Add Row" in Details.  Displayed "Rows" disapear.

I've created an application using the Master Detail form.
I would like to "add" new rows, by inserting a new blank row in my Master Form. Currently it goes to the second page and gives me an input form. I'd like to add the new record directly to the Master Report. Can this be done (since the report is "tecnically" not a form?
Also, when adding a "Row" to my "Details" form, I get a new "blank" row, but the rest of the tabular form, that was displayed before hitting the "Add Row" button.
Any ideas?
Thanks,
leonhardtk.

Hi,
your question is not clear and thus hard to answer.
I have 'Create form' with Application table from a VO. initially Createform should display the template of VO in Application table to insert new rows only.
What does the sentence above mean? You create an ADF form from a View Object (this I understand). But what do you mean by +"template of VO in Application table"+ ?
but when I click on 'Add Row' in Application table..the new entry is not coming
Thought you were using an ADF form? (see how confusing your question is ?)
Maybe this helps anyway: If you create new rows in a table, you don't use the Create but CreateInsert operation
Frank

Similar Messages

  • Add a Detail Table Row per master row

    Hi,
    I am currently working on a requirement for a master detail advanced table.
    I am trying to add one detail row per master row when the page loads based on the link between the two.
    I have a master table with 20 records and I need to create 1 detail row per master row....
    I have managed to create an add detail row button which works fine for single additions, but cannot seem to get the detail VO to add a row for each master row through the AM or CO.
    I have created a process to insert rows into the VO which based on debug statements seems to work, but nothing shows within the detail table.
    in the PR I run the query for the master, which in turn shows the detail row (Detail boolean is set to True).
    However any attempt to add it programatically does not seem to work.
    Any ideas appreciated.
    Patrick
    Edited by: patrickmburke on 10/10/2012 19:26

    Hi,
    Here's some more code :
    - The column in a default adf read only table :
                    <af:column headerText="Action / State">
                         <af:commandLink actionListener="#{bindings.setCurrentRowWithKey.execute}"
                                                  action="#{backingBeanScope.backing_page.validerRSP_action}">
                              <af:image source="/gfx/icon_valid.PNG"/>
                         </af:commandLink>
                     </af:column>- SetCurrentRowWithKey in page def
        <action IterBinding="ViewObject1Iterator"
                id="setCurrentRowWithKey5"
                InstanceName="AppModuleDataControl.ViewObject1"
                DataControl="AppModuleDataControl" RequiresUpdateModel="false"
                Action="setCurrentRowWithKey">
          <NamedData NDName="rowKey" NDValue="${row.rowKeyStr}" NDType="java.lang.String"/>
        </action>I haven't figure out the solution yet.
    Regards.
    Luc-

  • Add a new Row in detail form

    Hello Everyone ,
    I have add row Botton on details form to add row and save button to save data .
    When I clicking to add row its creating new row but as i am saving it it says 1 row inserted but when i am accessing the same data the new added row was not showing there .
    I am not getting any error .I have master detail form
    Thanks in advance

    I'm having the same issue.
    However, I've noticed that the ROW in question is getting added to the database, but it's not populating the KEY column that links the sub table.
    MASTER TABLE
    MK_ID number
    MK NAME varchar
    SUB TABLE
    SK_ID number
    MK_ID number (should link to above)
    SK_NAME varchar
    I get the message that the row has been added in APEX, but then nothing shows on the web form.
    Doing a quick query of the Sub Table, I can see the row (minus the Master Table key).
    MASTER TABLE
    MK_ID = 1
    MK_NAME = KEN
    SUB TABEL
    SK_ID = 3
    MK_ID is NULL !!
    SK_NAME CHILD1
    It "ALMOST" works.
    I used the wizard to create this, and did NOT modify anything, so I assume this should be an open bug, and people shouldn't use it.
    Cheers!
    Edited by: Canucklehead on Nov 23, 2008 4:52 PM

  • Problem with "Uncommited changes" when viewing certain rows in detail group

    Hi Guys,
    When I try to view an row in a detail group I get a popup box saying that there's uncommitted changes. This will happen even when there's no changes in the master group. It will also happen for all rows in the detail group except for the first row listed.
    e.g.:
    Master Group is department
    Detail group is employees
    The detail group will display:
    Employee 1
    Employee 2
    Employee 3...
    If I select to view the details for employee 1 it will go to the form view without any problems, if I select any other row (2,3,4..) I get a popup box warning that there's uncommitted changes on the current page.
    If I go into the form view of employee 3 (confirming that there's uncommitted changes on the current page as I do) and then use the breadcrumbs to go back to the department screen then Employee 3 is the only detail group row I can go into without getting the uncommitted changes popup.
    How is it possible that different rows in a detail group can cause this popup to happen?
    I am using JDev 10.1.3.2
    and the pages where generated by JHS 10.1.2.26
    Is it possible that when the radio button that is used to select a detail group is changed that this is showing up as an uncommitted change in the javascript?
    I need a fix for this urgently so a fast response would be greatly appreciated
    Bar

    Im using a custom method to stack the detail groups and Im missing the line that adds the radio button to the ignore list:
    #if (${JHS.service.generateJavaScript})
    <afh:script text="addToIgnoreChangedFields(['${group.name}:${group.name}Table:selected']);" id="${group.shortName}IgnoreChangedFields"/>
    #end
    is there a certain place to add this in the template?

  • SSRS Print one row then detail urgent...

    hi all,
    I have a report that has two sections of data. In a list component with textboxes I have Barcode, warehouse location, pallets. Then below this I have detail information in a tablix
    including Racklocation Use by date, Qty, Product, Description, PalletID, Customer Product and Weight. How do I print one barcode row then detail for that shipment, then page break? Then same again for next barcode row? Thanks i'm really banging my head with
    this one! I thought if I inserted the row detail into the list component above it would print one barcode, then detail, then next barcode, detail etc. but the datasets are different and it looks like the list has to use the same dataset... 

    Hi jhowe1,
    According to your description, you want to display the barcode with detail information "one to one", then set page break between each "data with barcode". Right?
    In this scenario, as you said the detail information and barcode are from different datasets, since both detail information and barcode are for a product, it supposed to have related columns in these two dataset so that we should use lookup function
    to return the column we want. Or we can create one dataset and use JOIN statement in query to combine all data from two datasets together. Then we just put the data into a list and add page break between each group instance.
    Reference:
    Lookup Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Displaying Row numbers starting from 1

    Hi every one,
    I want to display row number as see in the report while printing, as I am using the fallowing formula I am getting row numbers including suppress records which I donu2019t want, right now my row number is starting from 10. Instead of 1u2026
    WhilePrintingRecords;
    Numbervar x;
    x:=x+1;
    I want row numbers for only display recordsu2026
    Please help me u2026
    Thanks,
    Krish.

    Krish,
    I am assuming that you are using a conditional formula to suppress the details section. If that is the case then add the conditional suppression logic to your running total formula. For example;
    WhilePrintingRecords;
    Numbervar x;
    If Not (condition for suppression) then x:=x+1 else x;

  • Number of currently displayed rows in report with pagination?

    Maybe I'm thinking to complicated, but ...
    In my report I use the HTMLDB_ITEM.CHECKBOX function in order to display a checkbox for each row:
    HTMLDB_ITEM.CHECKBOX(1,"ID",NULL,:P311_ASSIGNED,':') " "
    Some of the checkboxes are selected depending on whether there is an entry for them in a database table.
    As the report returns hundreds of rows, I use pagination (e.g. 15 rows per page).
    After checking/unchecking the checkboxes and submitting the page by clicking the save button, I want to do the following: For each row CURRENTLY DISPLAYED on the screen (1) check, whether its checkbox is currently checked or not (2a) If it is checked and there is not yet an entry -> add row to the db table (2b) If it is unchecked and there is an entry in the db table -> remove row from db table.
    How can I, on the server side, find out which rows (row ids) are currently displayed (using pagination), so that I check each of the currently displayed row ids for their existence in the database table? Is there any item stored on the server side, which tells me the row number of the first row currently displayed? Is there an item I can refer to, which tells me the amount of rows, which are displayed on one page?
    Your help would be very much appreciated!
    Konrad

    Hi Konrad,
    I will jump in. :-) Just have a few minutes before a meeting.
    I think you don't have to make it that complicated, where you have to know the current pagination.
    1) Your HTMLDB_ITEM.CHECKBOX has to contain as checked value #ROWNUM# as the row selector would do it.
    2) You have to create a hidden item where you store your customer id
    3) create another hidden item where you store if the customer has already the assignment
    4) In your process you are now able to loop through your arrays.
    DECLARE
        vRowNumber BINARY_INTEGER;
        vFound BOOLEAN;
    BEGIN
        -- insert new event assignments
        FOR ii IN 1 .. WWV_Flow.g_f01.COUNT -- your checkbox
        LOOP
            vRowNumber := WWV_Flow.g_f01(ii);
            -- no assignment yet?
            IF WWV_Flow.g_f03(vRowNumber) IS NULL -- your hidden field where you store if you have an assmnt
            THEN
                INSERT INTO xxx VALUES (WWV_Flow.g_f02(vRowNumber)); -- your customer id
            END IF;
        END LOOP;
        -- delete old event assignments
        FOR ii IN 1 .. WWV_Flow.g_f03.COUNT -- your hidden field where you store if you have an assmnt
        LOOP
            -- only if the event was already assigned
            IF WWV_Flow.g_f03(ii) IS NOT NULL
            THEN
                vFound := FALSE;
                FOR jj IN 1 .. WWV_Flow.g_f01.COUNT -- your checkbox
                LOOP
                    -- is the event still checked?
                    IF WWV_Flow.g_f01(jj) = ii
                    THEN
                        vFound := TRUE;
                        EXIT;
                    END IF;
                END LOOP;
                IF NOT vFound
                THEN
                    DELETE xxx WHERE CUSTOMER_ID = WWV_Flow.g_f02(ii);
                END IF;
            END IF;
        END LOOP;
    END LOOP;Haven't tested the code, but I think it should show the idea.
    Hope that helps
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

  • Problem with "PL/SQL Dynamic Content" and displaying rows

    hi,
    im new to APEX, and pl/sql [but not web dev or sql].
    ive found the bit in APEX that lets you add data from your DB using the 'CREATE' > 'PL/SQL Dynamic Content'.
    maybe there's a better option for people who dont know pl/sql? i dont know?
    however, i think i can getting working with a little bit of help but im stumbling around in the dark a bit here.
    ok so this is the pl/sql ive come up with to show three example values on page 23 of my aplplication:
    BEGIN
    SELECT ID, NAME, OWNER
    FROM COM_MAILSHOTS
    INTO :P23_ID, :P23_NAME, :P23_OWNER;
    END;
    im getting the error:
    1 error has occurred 
    ORA-06550: line 5, column 21: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored
    thanks for reading!

    Metabaron wrote:
    hi,
    im new to APEX, and pl/sql [but not web dev or sql].
    ive found the bit in APEX that lets you add data from your DB using the 'CREATE' > 'PL/SQL Dynamic Content'.
    maybe there's a better option for people who dont know pl/sql? i dont know?
    The easiest (and best) way to "display rows" is using a report. Dynamic PL/SQL regions are more complex and are required much less frequently.
    The Oracle® Database 2 Day + Application Express Developer's Guide tutorial explains how to create reports and other basic APEX techniques.

  • Report Row With Detail (IFRAME) - How to reload Main Page within iFrame

    Hi,
    Based on Carl's example - Report Row With Detail (IFRAME), i.e:
    http://htmldb.oracle.com/pls/otn/f?p=11933:17
    Within my scenario, I have a button within the iframe section of my report that calls a pl/sql process that performs some database processing.
    What I basically need is a means of performing a page refresh of the main page, when this button within the iframe is pressed. In Carl's example, that would be page 17.
    As mentioned, I call a PL/SQL process within the iframe, but unsure how to then refresh the main page - parent page.
    Any help would be appreciated.
    Thanks.
    Tony.

    Tony,
    you could insert the following script to the region footer of a region located on your "iframe"-page.
    <script>
    parent.location.reload();
    </script>
    But this is dangerous because everytime the parent is being reloaded, the iframe is loaded, too. Risk of loop...
    A possible solution is to conditionally display a html region (with the script) on your iframe-page basing on a request. You could post the request as a result after your plsql processing in a branch.
    Regards,
    Jens

  • How to display rows from index 1 to all in a table

    Hi,
    I am facing a problem please help me.
    I created a node in context with cardinality 1..n so that there will always be a element present for that node.
    From one view i am providing data to this node and adding new blank element to this node.
    I binded a table from view to this node so that it is displaying all the rows with a blank row at the start.
    Now  i want to display all the elements of that node except that blank first element in to a table

    Hi Amol,
    You can invalidate the node before and then add the elements from the second table or you can remove the blank element from the node.
    you can use the following code to remove an element
    int listSize = wdContext.node<Node Name>().size();
    if(listSize > 0)
    for(int i = listSize - 1; i >= 0; --i)
    wdContext.node<Node Name>().removeElement(wdContext.node<Node Name>().getElementAt(i));
    or use the following code to invalidate the node.
    wdContext.node<Node Name>().invalidate();

  • Is it possible to change the number of rows to be displayed in adf query ?

    Hello,
    is it possible to change the number of rows that are displayed in an adf query similar to an adf form ?
    I need to display approx 5 rows per column instead of displaying all the fields in a single column ? Thanks.

    Thanks , how do you add in the code ,is it something like follows :
    <af:query id="qryId1" headerText="Search" disclosed="true"
                                value="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
                                model="#{bindings.ImplicitViewCriteriaQuery.queryModel}"
                                queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
                                queryOperationListener="#{bindings.ImplicitViewCriteriaQuery.processQueryOperation}">
                        <af:inputText value="#{bindings.PrtDesc.inputValue}" label="Desc"
                                      required="#{bindings.PrtDesc.hints.mandatory}"
                                      columns="#{bindings.PrtDesc.hints.displayWidth}"
                                      maximumLength="#{bindings.PrtDesc.hints.precision}"
                                      shortDesc="#{bindings.PrtDesc.hints.tooltip}" id="it3">
                          <f:validator binding="#{bindings.PrtDesc.validator}"/>
                        </af:inputText>
                      <af:column>
                       <af:outputtext/>
                        <af:outputtext/>
                     </af:column>
                      </af:query>

  • Select a range of rows to be displayed using ROWNUM

    I am trying to select a range of records to be displayed using Rownum
    It works using MINUS
    SQL> select rownum,department_id,department_name from departments where rownum <= 20
    minus
    select rownum,department_id,department_name from departments where rownum < 11;
    but does not work if a range is specified
    select rownum,department_id,department_name from departments where rownum >= 11 and rownum <= 20;
    What has gone wrong?
    Details of what I have tried are as follows:
    Connect to the sample schema HR
    SQL> connect hr/hr
    SQL> desc departments
    Name Null? Type
    DEPARTMENT_ID NOT NULL NUMBER(4)
    DEPARTMENT_NAME NOT NULL VARCHAR2(30)
    MANAGER_ID NUMBER(6)
    LOCATION_ID NUMBER(4)
    List all records in Departments
    SQL> select rownum,department_id,department_name from departments;
    ROWNUM DEPARTMENT_ID DEPARTMENT_NAME
    1 10 Administration
    2 20 Marketing
    3 30 Purchasing
    4 40 Human Resources
    etc......
    26 260 Recruiting
    27 270 Payroll
    27 rows selected.
    List the first 10 records in DEPARTMENTS
    SQL> select rownum,department_id,department_name from departments where rownum <= 10;
    ROWNUM DEPARTMENT_ID DEPARTMENT_NAME
    1 10 Administration
    2 20 Marketing
    etc.....
    10 100 Finance
    List row number from 11 to 20, but cannot no rows selected. Why?
    SQL> select rownum,department_id,department_name from departments where rownum >= 11 and rownum <= 20;
    no rows selected
    Use of MINUS can retrieve row number from 11 to 20
    SQL> select rownum,department_id,department_name from departments where rownum <= 20
    minus
    select rownum,department_id,department_name from departments where rownum < 11;
    ROWNUM DEPARTMENT_ID DEPARTMENT_NAME
    11 110 Accounting
    12 120 Treasury
    13 130 Corporate Tax
    14 140 Control And Credit
    15 150 Shareholder Services
    16 160 Benefits
    17 170 Manufacturing
    18 180 Construction
    19 190 Contracting
    20 200 Operations
    10 rows selected.

    For each row returned by a query, the ROWNUM pseudocolumn returns a number indicating the order in which Oracle selects the row from a table or set of joined rows. The first row selected has a ROWNUM of 1, the second has 2, and so on.
    Conditions testing for ROWNUM values greater than a positive integer are always false. For example, this query returns no rows:
    SELECT * FROM employees
    WHERE ROWNUM > 1;
    You can get the selected records based on the rownum using the inline query....
    SQL> select rownum, empno from emp;
    ROWNUM EMPNO
    1 7369
    2 7499
    3 7521
    4 7566
    5 7654
    6 7698
    7 7782
    8 7788
    9 7839
    10 7844
    11 7876
    ROWNUM EMPNO
    12 7900
    13 7902
    14 7934
    14 rows selected.
    SQL> select * from (select rownum rn, empno from emp) where rn > 2 and rn < 5;
    RN EMPNO
    3 7521
    4 7566

  • How to change the number displaying rows in a table

    Hi all,
    i have a table for resources in Debrief Work order (Standard Screen), we need to change the default displaying rows. inistially it displayed 3 empty rows.
    i tried to change the Records Displayed for the table but it did not affect.
    also it is possible to change the "Add 3 rows" button in the table to add for example 5 rows instead?
    any idea?
    Regards,
    Mahdi Charara

    Hi,
    Through personalization we can do.On standared page top right u will find personalization link.click on the clink next expand all there find apporiate table .Here u will fine reorder button set as u want display and save. then u can see the change.For add row functionality u need to extend the co.

  • Displaying row numbers in tables

    Is there a way to get JTable to display row numbers on the left-most side of the table? Are there any functions in JTable that will allow you to do this?
    I am thinking that to do this, I will probably need to add a column to my table model and make the first column and uneditable JLabel that shows the row number.
    Thanks for any help.
    Mike Ryan

    Ok , the class i am pulling this code from is 500+ lines of code, so I will try to pull out only the important pieces.
    private DefaultTableModel theNorthernModel;
    private JTable theNorthernTable;
    private DefaultTableCellRenderer[] theRenderer;
    private JScrollPane theNorthernPane;
    private Object[] rowTitles = {"1", "2", "3",  "4", "5",  "6", "7"};//
    private Object[] colTitles  = {"one","two","three","four","five","six"};
         theNorthernModel = new DefaultTableModel(rowTitles.length,colTitles.length);
              theNorthernTable = new JTable(theNorthernModel);
              theNorthernTable.setCellSelectionEnabled(false);
              theNorthernTable.setEnabled(false);
              theNorthernTable.getTableHeader().setReorderingAllowed(false);
              theNorthernPane  = new JScrollPane(theNorthernTable);
              theNorthernPane.setPreferredSize(new Dimension(600, 150));
    //this is the stuff you want          
    ListModel listModel = new AbstractListModel() {
                 public int getSize() {
                         return rowTitles.length;
                public Object getElementAt(int index) {
                     return rowTitles[index];
            JList rowHeader1 = new JList(listModel);
            rowHeader1.setBackground(theNorthernPane.getBackground());
            rowHeader1.setFixedCellWidth(140);
            theNorthernPane.setViewportView(theNorthernTable);
            theNorthernPane.setRowHeaderView(rowHeader1);
            rowHeader1.setCellRenderer(new RowHeaderRenderer(theNorthernTable));
    theRenderer = new DefaultTableCellRenderer[6];
              for(int i = 0; i< 6; i++) {
                   theRenderer[i] = new DefaultTableCellRenderer();     
    theColumnModel = (DefaultTableColumnModel)theNorthernTable.getColumnModel();
    * RowHeaderRenderer renders the panel's rows
    class RowHeaderRenderer extends JLabel implements ListCellRenderer {
         * Constructor creates all cells the same
         * To change look for individual cells put code in
         * getListCellRendererComponent method
        RowHeaderRenderer(JTable table) {
            JTableHeader header = table.getTableHeader();
            setOpaque(true);
            setBorder(UIManager.getBorder("TableHeader.cellBorder"));
            setHorizontalAlignment(CENTER);
            setForeground(header.getForeground());
            setBackground(header.getBackground());
            setFont(header.getFont());
         * Returns the JLabel after setting the text of the cell
        public Component getListCellRendererComponent( JList list,
        Object value, int index, boolean isSelected, boolean cellHasFocus) {
            setText((value == null) ? "" : value.toString());
            return this;
    }

  • Row Text Details

    Hi,
       I am working on SAP 8.8 patch11. I have an requirement to enter the Row Text Details through Code in Document Forms.
       I  need to do this  using a user defined column in the matirx. I have done the following things.
      1. Loop  through  the Matrix.
      2. When my user defined field in the row is having some value , Then I will change the Row Type to "T".
      3. When I set a Row Type to "T" , Application will open a form to enter the details (Form Id : 65088).
      4. I entered the value in the form on Form load event before action false.
      5. After that I want to close the form (65088) and loop through next row.
      6. I closed the Form on got focus of the Document Form. But the data was not set in the Row.
    How to do this ?
    Thanks in Advance !
    Madhu

    You can do it easy from DI API instead of GUI.
    You can use the
    Document.SpecialLines object to handle this
    here is an example from help,
    Sub AddSpecialLine()
            'Adding special line
            'Assume Qut is an existing Quotation Document Object
            'Setting the type of special line to be sub total
            Qut.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Subtotal
            'Setting the after line number
            'A number that says after which line the special line will appear
            Qut.SpecialLines.AfterLineNumber = 2
            'Check for errors
            lRetCode = Qut.Update()
            If lRetCode <> 0 Then
                oCompany.GetLastError(lErrCode, sErrMsg)
                MsgBox(lErrCode & " " & sErrMsg) ' Display error message
            Else
                MsgBox("Special Lines Added")
            End If
    End Sub
    Regards
    János

  • Display Rows continuously from start to bottom

    Hello All;
    What i need to do is to display 1000 logs coming from the server into 20 rows continuously.Does anyone have any idea??
    I am storing the data strings coming from the server into the vector container. And that i have to display continuously from 0th Row row to 19th row i.e total 20 rows continuously, till the 1000 logs are complete.
    I have 20 rows and i need to display the data in format like, deleting or storing the data from the first row into the vector and then move it continuously from the bottom to top ie if 1st row has 999th log then after 1st fill 19th row has 980th log now after
    that we have to store 999th data in vector and decrement log count from bottom row i.e 19th row like 979,978,977 and so on.
    Please help if anyone has some idea.

    David Sir,
    I want to display all logs starting from last index that is 999 to 0 logs continuously on 20 rows one by one.
    Do you know sir what to do with it and how to display continuously.
    Thanks.
    Here's what I find frustrating about your question.
    I don't know if you're designing a Win32 desktop application, Console application, Web page, or what.  This GREATLY affects what it means to "display" something.  So I'm left to assume that you are writing a native Win32 windows desktop
    application using MFC (I deduce this solely on the appearance of CString in your code.)
    A log is typically a collection of log entries.  1000 logs to me suggests 1000 different collections of log messages, each with multiple rows.  But I have to assume that what you are calling a "log" is what I would call a "log entry"
    or "log message".  (One record in a table of log messages.)  This affects in what manner they would be displayed such as in one column vs multiple columns.
    When you say rows, it typically suggests data tables and database operations.  You haven't said if anything database related is going on.  And although "GetField" looks vaguely ADO-like, I'm going to assume that it is not.  But it
    does suggest to me that your log message is divided into fields, and that you probably want to display columnar data.  The only thing that contradicts that is that I had to look at some of your past posts to figure out that you are writing in native C++
    and that you are (likely) trying to manage a std::vector of strings.  So that suggests to me that each log message is just a simple string.  This means that you probably don't need a table view.
    You haven't really given me a good sense of what you mean by continuously.  You may mean that it updates periodically, or that rows appear one after the other, or that it scrolls with smooth animation.
    What you've said is that you have "20 rows of string field".  I'm not sure if you mean that you have 20 static label controls ... it kind of sounds like that may be what you mean.  But regardless, it sounds like you have "room"
    to display 20 items and you want to display 1000 in that space.  This is where it breaks down for me.  What do you want to have happen?  I'm afraid I just don't get it from your explanation yet.
    You said you were able to display 20 of the 1000 messages but you "don't have any button".  You also said that it is not event driven programming", (which is contrary to my assumption that you are creating a Win32 windows desktop application")
     So I'm not sure what constraint this has placed on you.
    It sounds like you may need to periodically update the screen with either an automatic "next page" feature, or that you want text to scroll by in an animation.
    You'll have to clarify these things if you want help.
    What you DID show me was an incomplete snippet of code with the following features:
    An unused, no-purpose text string variable.
    An undescribed  GetField function and an undescribed SetValueString method of some unknown class.
    I'm trying very hard to help you, but you haven't described this in enough detail for me to do so.
    What aspect of this do you need help with?  What did you try?  And why didn't it work?

Maybe you are looking for