Selecting Grid Rows Through Event Rules

sutra82

Member
Hello

I'd like to select a grid row through event rules the same way a user does, if he clicks on the row. Afterwards i would press the select button and use the information in the selected grid row.

Thanks for your help!
 
Hi sutra82,

First of all, welcome aboard.

Use the InsertGridBufferRow system funtion to insert a dummy row close to the desired row and delete this dummy row immediately.

I do not remember that where do you need to insert the dummy row: before or after your row.

This requires a bit work around, experimentation from you, but hopefully it will work.

Please, let us know your results. If it works, then would be nice to describe the solution a bit detailed.

Good luck,

Zoltán
 
Hi Zoltan,

thanks very much for your tip!

my solution isn't variable, whatever you enter into the system functions, it will always select the first row. but this works for me because i'll only have one record in the grid:

Listing of ER for Application : test select grid row with er (P55TEST)


=======================================================================
FORM: Find/Browse [FIND BROWSE] (W55TESTA)
=======================================================================
CONTROL: FORM
EVENT: Post Dialog is Initialized
-----------------------------------------------------------------------
0001 Press Button(HC F&ind)

-----------------------------------------------------------------------
EVENT: Last Grid Record Has Been Read
-----------------------------------------------------------------------
0001 Insert Grid Buffer Row(FC Grid, "3", <Yes>, <No>, <Yes>, <Yes>, <Yes>)
0002 Delete Grid Row(FC Grid, "3")
0003 Press Button(HC &Select)

=======================================================================
CONTROL: HYPITEM &Select
EVENT: Button Clicked
-----------------------------------------------------------------------
0001 Call( App:p55TEST , Form: W55TESTB )
GC User ID -> szUserId1

Wednesday July 28, 2004 17:37


has anyone got the improved version?

cheers!
 
Hi,

Could you use system function Get Grid Row. e.g. Get Grid Row(FC Grid, VA frm_Counter_MATH80), where the second parm is the row number? (In your case 1)

Regards

Neil.
 
Hi sutra82,

Neil is right. Get Grid Row system function is the most appropriate solution, when highlighting the selected row is not rquired.

I would like to encourage you to make a little tour in the On-Line help and go through the Events section (in your case currently Interactive events). Today was a topic here, how to access this help.

Hope, it will be usefull for you and you will gain more hints, ideas from this help.

Regards,

Zoltán
 
Back
Top