Solved

New row on tab out with focus in datawindow

Posted on 2011-02-21
1
640 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

717 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