Solved

New row on tab out with focus in datawindow

Posted on 2011-02-21
1
635 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

734 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