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

Shift click to select multiple rows in dw

168 views
Skip to first unread message

harlibra

unread,
Aug 19, 2010, 4:57:50 PM8/19/10
to
Instance Variable Declaration

long il_lastclickedrow

Clicked Event Of The Standard Datawindow UO

/* Row is an argument to the clicked! event and contains the row
number clicked. If row = 0, then the user did not click on a row */

IF row = 0 THEN Return

IF KeyDown ( KeyShift! ) THEN
/* This event is described later in this document */
this.Event ue_rowhighlight ( row )

ELSEIF KeyDown ( KeyControl! ) THEN
IF this.GetSelectedRow ( row - 1 ) = row THEN
this.SelectRow ( row, FALSE )
ELSE
this.SelectRow ( row, TRUE )
END IF
ELSE
this.SelectRow ( 0, FALSE )
this.SelectRow ( row, TRUE )
END IF

// Save the row clicked in the instance variable for use in
ue_rowhighlight
il_lastclickedrow = row


CUSTOM EVENT "ue_rowhighlight" ON THE STANDARD DATAWINDOW USER OBJECT.

Event has no event ID mapping and takes the following argument:
name = al_row, datatype = long, passed by value Event returns [None]

This function will verify that there is a prior selected row and then
highlight all Rows between the two. If there is no previously Selected
row, then it will highlight only the row clicked. This function will
not unhighlight any other rows to allow for a mix of shift and Control
keys. This code is aware of the relation between the rows and
highlights the rows in the appropriate direction.

The argument passed will be the last row clicked. This function will
use the existing DataWindow and the instance variable
il_lastclickedrow to perform its scrolling:

integer li_i

this.SetReDraw ( FALSE )

IF il_lastclickedrow = 0 THEN
this.SelectRow ( al_row, TRUE )
Return
END IF

IF il_lastclickedrow > al_row THEN
FOR li_i = il_lastclickedrow to al_row STEP -1
this.SelectRow ( li_i, TRUE )
NEXT
ELSE
FOR li_i = il_lastclickedrow to al_row
this.SelectRow ( li_i, TRUE )
NEXT
END IF

this.SetReDraw ( TRUE )

harlibra

unread,
Aug 19, 2010, 5:01:41 PM8/19/10
to
HI there I am trying to select multiple rows in a dw by using shift
click (Key board + mouse) feature. I am using the code as in Sybase
manuals but its not working. Please help

harlibra

unread,
Aug 19, 2010, 5:18:08 PM8/19/10
to

bruce.a...@yahoo.com

unread,
Aug 23, 2010, 9:28:56 PM8/23/10
to

You should be aware that posting through Google Groups will not get
your message to the Sybase server. You might want to consider posting
to the server directly.

premcha...@gmail.com

unread,
Dec 5, 2012, 9:40:44 AM12/5/12
to
Thanks for posting this... It helped me... :)

venkatesh....@gmail.com

unread,
Oct 6, 2016, 5:53:15 AM10/6/16
to
On Friday, August 20, 2010 at 2:31:41 AM UTC+5:30, harlibra wrote:
> HI there I am trying to select multiple rows in a dw by using shift
> click (Key board + mouse) feature. I am using the code as in Sybase
> manuals but its not working. Please help
>
> Instance Variable Declaration
> long il_lastclickedrow
>
>
> Clicked Event Of The Standard Datawindow UO
> http://www.mytechlogy.com/IT-blogs/12921/selecting-multiple-rows-in-datawindow/#.V_Ye9lt97cs
0 new messages