Set Focus on Column in external datawindow

How do I set the focus to a column in an external datawindow ? 
Specifically: I have an external dw with an editable column. After the user
edits the column, a remote object validates the entry. If validation fails,
I want the focus to go back to the column, with the text selected. 
I tried to use the itemchanged event (returning 1) but that seems to
trigger the datawindow validation message, and I need to display different
messages depending on what the user typed. 
SetColumn doesn't work either, the cursor always goes to the next column in
the tab order. 
I guess the fact that I have an external dw is irrelevant here, so I may as
well ask: How do I set the focus to a particular column in a datawindow ?

Sam Camargo
0
Sam
4/6/1998 12:16:15 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

6 Replies
1097 Views

Similar Articles

[PageSpeed] 36

Thanks!  your solution is just what I needed. 

Now I'm curious about the more general question of setting the focus to a
column in a datawindow (any column, not necessarily the one just edited).
Is it possible? Is there something like dw_1.col_1.Setfocus( ) ?  (that one
doesn't even compile)

Sam Camargo
0
Sam
4/6/1998 1:27:20 PM
Sam -- 

External datawindows are no different than regular datawindows.  You're
on the right track by validating the new data in the itemchanged event. 
However, you're missing a few things.  First, if the item fails the
validations in your remote object, then you should return 1 from the
itemchanged event.  This will reject the value and not allow focus to
change.  The datawindow validation message appears because you don't
have anything in the itemerror event.  By default, if 0/nothing is
returned from the itemerror event, PB will display it's "datawindow
validation message".  To suppress this, you can return 1 from the
itemerror event.  All of this and more can be found in the help file. 
Just look under itemchanged and itemerror.

HTH

Ron Gallagher, CPDP
Atlanta, GA, USA
rongallagher@mindspring.com

Sam Camargo wrote:
> 
> How do I set the focus to a column in an external datawindow ?
> Specifically: I have an external dw with an editable column. After the user
> edits the column, a remote object validates the entry. If validation fails,
> I want the focus to go back to the column, with the text selected.
> I tried to use the itemchanged event (returning 1) but that seems to
> trigger the datawindow validation message, and I need to display different
> messages depending on what the user typed.
> SetColumn doesn't work either, the cursor always goes to the next column in
> the tab order.
> I guess the fact that I have an external dw is irrelevant here, so I may as
> well ask: How do I set the focus to a particular column in a datawindow ?
> 
> Sam Camargo
0
Ron
4/6/1998 2:16:31 PM
Check out the SetColumn function.

Ron Gallagher, CPDP
Atlanta, GA, USA
rongallagher@mindspring.com

Sam Camargo wrote:
> 
> Thanks!  your solution is just what I needed.
> 
> Now I'm curious about the more general question of setting the focus to a
> column in a datawindow (any column, not necessarily the one just edited).
> Is it possible? Is there something like dw_1.col_1.Setfocus( ) ?  (that one
> doesn't even compile)
> 
> Sam Camargo
0
Ron
4/6/1998 9:17:41 PM
Take a look at the SetColumn ( ) function in the online help. The column is
passed as a parameter to the function.


HTH

Sanjiv Das [TeamPS]


Sam Camargo wrote in message
<01bd6168$e7ab53e0$c34aa382@CACI4.rsc.crane.navy.mil>...
>Thanks!  your solution is just what I needed.
>
>Now I'm curious about the more general question of setting the focus to a
>column in a datawindow (any column, not necessarily the one just edited).
>Is it possible? Is there something like dw_1.col_1.Setfocus( ) ?  (that one
>doesn't even compile)
>
>Sam Camargo




0
Sanjiv
4/7/1998 4:17:07 AM
Sanjiv Das [TeamPS] <eMail-SDas@CompuServe.Com> wrote in article
<kumjDPdY9GA.575@forums.powersoft.com>...
> Take a look at the SetColumn ( ) function in the online help. The column
is
> passed as a parameter to the function.
> 
> Sanjiv Das [TeamPS]

I tried that but it didn't work. My problem is that I'm trying to set the
focus to a column which depends on what the user entered. The itemchanged
event seems like a good place to code this, but calling SetColumn( ) there
may cause a stack fault (that didn't happen to me, though). Using the
return codes from the itemchanged event I can only set the focus to the
next column in the tab order or to the column whose value was changed, how
do I get the focus to another column ?

Sam

0
Sam
4/8/1998 1:56:58 PM
Try posting to another event that does the setcolumn.
hth

Sam Camargo wrote:

> Sanjiv Das [TeamPS] <eMail-SDas@CompuServe.Com> wrote in article
> <kumjDPdY9GA.575@forums.powersoft.com>...
> > Take a look at the SetColumn ( ) function in the online help. The column
> is
> > passed as a parameter to the function.
> >
> > Sanjiv Das [TeamPS]
>
> I tried that but it didn't work. My problem is that I'm trying to set the
> focus to a column which depends on what the user entered. The itemchanged
> event seems like a good place to code this, but calling SetColumn( ) there
> may cause a stack fault (that didn't happen to me, though). Using the
> return codes from the itemchanged event I can only set the focus to the
> next column in the tab order or to the column whose value was changed, how
> do I get the focus to another column ?
>
> Sam



0
Charles
4/11/1998 3:33:43 PM
Reply:

Similar Artilces:

External Datawindow
Hi, I am currently loading a database table from an external datawindow and this is working fine when the rows are just inserted into the table. I am having a problem though on figuiring out how to tell Powerbuilder to update a row instead of inserting a new one. The following is how I do an insert. **** Get the colum Count li_column_total = Integer(lds_data.describe("Datawindow.column.count") ****Loop through and set the columns to updateable FOR ll_counter = 1 to li_column_total ls_column_name = lds_data.describe("#" + string(ll_counter) ...

Setting column's property in a datawindow from composite datawindow
Hi I know this is easy but I cant get it to work. I have two datawindows controls (dw_1, dw_2) in a composite datawindow (dw_report). I want to change Text of a header column of dw_2, so I try it using: 1. GetChild and Modify ------ datawindowchild ldw_child Int li_Rtn String ls_Error dw_Report.SetTransObject ( SQLCA ) li_Rtn = dw_Report.GetChild ( "dw_2", ldw_Child ) /* This returns 1, no problem */ If li_Rtn = 1 Then ls_Error = ldw_Child.Modify ( "item_number_t.Text = ~'New Text~' ") /* ls_Error is empty string, no problem, but report do...

problem setting focus to datawindow-column
I have a screen with several datawindows on it. When the values in these dw's are checked, a message will appear and the focus should be set back to the right dw and column in that dw, but I can't get this to happen correctly. I keep getting the focus back to the first column in the first dw on the screen! When the checks are performed, a few windowfunctions are triggered, as well as a few user events. I'm under the impression that the 'getfocus'-events of all the dw's are triggered first when the messagebox disappears and the focus is back on the screen. I kn...

DataWindow This, DataWindow That...
Blah blah blah You've heard it enough that you don't even want to comment on how many times... The DataWindow. ....but it can't be enough anymore...can it? This from one of our colleagues (and yes my apologies for taking it out of context)... "...PB covers all you need to do that in ONE Tool. This includes Windowprogramming ( meaning the interface to the user: Windows, Sheets, diallougeboxes, etc.), Database operability AND Reporting! Well, I see als well as many other PB users that some of the implementations and features PB offers are improvable. But thi...

set focus to first column on web datawindow
How do I have the focus set to the first column on my web datawindow when the page is loaded? Jon Groves This is not the right group for questions about HTMLDW. The right group is: sybase.public.easerver.htmldw Did you try SetColumn("columnname")? -- Rahul Jain On Tue, 25 Mar 2003 09:47:28 -0500, Jonathan Groves wrote: > How do I have the focus set to the first column on my web datawindow when > the page is loaded? > > Jon Groves thank you "Rahul Jain" <rahul.jain@mail.com> wrote in message news:4aocjhjv8l5u.q3uh6378neyt.dlg...

setting the focus to a row/column of a web datawindow
Hi all, I'd like to set the input focus for a html page containing a web datawindow to a certain row and column (first row, column "username"). of the datawindow. For the time being I've succes using document.dwClient_dataForm.username_0.focus(); in a function called in the onLoad() event of the page. Just to be sure, is that the correct method to achieve what I want? I thought it should be something like dwClient.SetRow(1); dwClient.SetColumn("username"); dwClient.SetFocus(); but this fails claiming that dwClient has no properties. ...

problem setting focus to datawindow-column #2
I have a screen with several datawindows on it. When the values in these dw's are checked, a message will appear and the focus should be set back to the right dw and column in that dw, but I can't get this to happen correctly. I keep getting the focus back to the first column in the first dw on the screen! When the checks are performed, a few windowfunctions are triggered, as well as a few user events. I'm under the impression that the 'getfocus'-events of all the dw's are triggered first when the messagebox disappears and the focus is back on the screen. I kn...

datawindow.column.count not returning the column count of a datawindow
I am having problems with the datawindow.column.count property of a datawindow. It just started happening with PB 6.501 and still works fine in PB 5.0. The function that looks at this property is in an ancestor userobject. The dataobject is assigned at this point but all other properties of the datawindow are missing. Any suggestions? Don't recall, but was it still dwDescribe() in version 5.0? If it was that may be your problem. HTH Kent Montgomery wrote: > I am having problems with the datawindow.column.count property of a > datawindow. It just started happenin...

External Datawindow in a Composite Datawindow
Hi All I have a question. Can I use an extrernal datawindow in a composite datawindow? If yes, how do we access its properties. The specific problem is that I want to combine two dws. One is generated externally and the other is a simple tabular dw coming from a db. If I try to use getchild() then I do not have columns for get child. I am using PB 7.0.3 on Windows 2000 Server with MS SQL Server. Thanks. Sincerely Saleem > Can I use an extrernal datawindow in a composite datawindow? If yes, how do we > access its properties. ldw_dw.object.r_pumpputyyppi.object...

IF you set column to width 0 in a datawindow grid, the column appear as a with column at the end of the grid
Can you remove the white space at the end of a grid, it seems to appear when we set columnwidths to '0'.. ICE I've not seen that. What version of PB are you using? What platform? On Tue, 27 Aug 2002 11:42:02 +0200, in powersoft.public.powerbuilder.datawindow ICE <ICE@nospam.com> wrote: >Can you remove the white space at the end of a grid, it seems to appear when >we set columnwidths to '0'.. > > >ICE > > Bruce Armstrong [TeamSybase] http://www.teamsybase.com Not 1 - but 2 new books on developing with PowerBuilder...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow!
This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C308EA.58A195E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can = not works). Also, I need access in each row then reset the value that I want = in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the = fi...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow!
Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can not works). Also, I need access in each row then reset the value that I want in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the first row of each datawindow. It seems I used the loop access the value it doesn't work. Indeed, It has the all data for me but just right for the first row in each data window. Could you have any ideas, please!...

Hide datawindow column in html datawindow
Is there anyway I can hide a datawindow column in the generated html? I can't make the visible property to false because doing that will not generate the column. I want the column with type as hidden in generated javascript. -Hitesh I don't think this is in the works for the next release but I know of several people who have mentioned it in the past. Try adding an enhancement request (I think you can do this through my.sybase.com). steve [TeamSybase] Hitesh Patel wrote: > > Is there anyway I can hide a datawindow column in the generated html? I > can&...

Problems with External Datawindows in Datawindow .Net
Has anyone used an external datawindow within a datastore in a .Net application? We are converting a piece of functionality from PowerBuilder to C# .Net and the routine uses an external datawindow. Since it is an external I didnt do SetTransObject before doing the InsertRow. I simply tried inserting a row into the datastore and a DatawindowNotCreatedException was thrown. Has anyone run into something similar? We are widely using external datawindow. Your error is not concerned with external datawindow. It is concerned with DataWindowControl bad behaviour (it is documented,...

Web resources about - Set Focus on Column in external datawindow - sybase.powerbuilder.datawindow

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 1/11/2016 7:02:22 AM