Solved

New row on tab out with focus in datawindow

Posted on 2011-02-21
1
606 Views
Last Modified: 2013-12-26
Hi

I have a multiple master-detail window
details are tabular
in detail I want in tab out (end of editable columns) to add a new row and keep the focus in the data window to continue editing

Thanks
0
Comment
Question by:basilhs_s
1 Comment
 
LVL 2

Accepted Solution

by:
lbushby earned 500 total points
ID: 34953101
In your tabular datawindow control map an event to 'pbm_dwntabout' e.g. call it 'ue_dwntabout', then all you have to do is code the event roughly as follows:

long      ll_row
long      ll_rowcount

ll_row = this.GetRow()
ll_rowcount = this.RowCount()

IF ll_row > 0 AND ll_row = ll_rowcount THEN
      // we are on the last row so insert a new one and move to it
      ll_row = this.InsertRow(0)
      this.SetRow(ll_Row)
            
      // have to post a setfocus to make sure we stay in the control
      this.function POST SetFocus()
END IF
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now