Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set Focus on Field in Datawindow

4,210 views
Skip to first unread message

pss...@gmail.com

unread,
Jun 13, 2006, 7:12:20 PM6/13/06
to
Hi All,

I have a 2 data windows, 1 which is a grid and holds all the records
and the second drives off the grid to displays the details of the
selected record. The user has an option to add a new record by
pressing a "Add" button which creates a new record in both data
windows.


The problem I am having is that when a new record is created, I can't
focus to a particular field on the details datawindow. I have read
other articles and tried the following:


dw_Name.SetColumn("first_name")


But it does not focus on the field. I have checked the tab order on
all the fields and they are ok.


Can anyone help please?


Thanks.

1sta...@post.sk

unread,
Aug 22, 2013, 10:15:57 AM8/22/13
to
Hello it should be like this :

int li_rowcount, li_newrow

li_rowcount = dw_1.rowcount()
li_newrow = li_rowcount + 1
dw_1.insertrow(li_newrow)
dw_1.scrolltorow(li_newrow)
dw_1.setfocus()

Bye :-) Happy powerbuildering :-)
Message has been deleted
0 new messages