Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add a row in Data Window. Urgent!!!!!

Status
Not open for further replies.

pbnovice

Programmer
Feb 21, 2002
1
0
0
IN
i'm using PB 6.0
i have two datawindow-master and detail in a window.
i also have a menu for creating a new record. can anybody tell me how to go about:
1. when the new menu item is clicked the datawindow should be cleared (both the datawindows for the new row to be inserted - master dw is freeform and detail dw is grid).
2. what to do when the user wants to just add one record in the detail datawindow. e.g. if 5 records are existing for a particular master parent record the user wants to add the sixth record. In such a case one row has to be appended to the grid style datawindow.

I tried a lot but couldn;t get to the solution. I would appreciate if anybody could help me since i'm a beginner in PB.

Thanks in advance.
 
Why don't you check the online help or help files (Whatever is the equivalent in PB 6) to learn a little about datawindow syntax? I know at least in PB 7 the search capabilities may be quite 'lame' but the information is all there, included in the installation...

As for your questions:

1) dw_x.Reset() (replace dw_x with the name of your datawindow

2) dw_x.InsertRow(0)
0 puts it at the top but you can insert it in any row you want using the row number you want to insert into

AG will be updated soon... well, at least I hope so ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top