Click to See Complete Forum and Search --> : FlexGrid


November 30th, 1999, 08:18 AM
Need to open FormB if a row in flexgrid of FormA is double-clicked and then display that row's info in text boxes of FormB.

Not a clue how to do this. Any help appreciated.

santulan
November 30th, 1999, 10:49 AM
Say there are three columns in flex grid and you wish to display then in formB when double clicked the grid which is placed on formA.
In double click event of flexgrid perform the following -
1. formB.text1.text = formA.msflexgrid1.textmatrix(formA.msflexgrid1.row,0)
2. formB.text2.text = formA.msflexgrid1.textmatrix(formA.msflexgrid1.row,1)
3. formB.text3.text = formA.msflexgrid1.textmatrix(formA.msflexgrid1.row,2)
4. formb.show 1

I hope this works as per your expectations :-)>



Santulan

November 30th, 1999, 12:19 PM
Thanks for your response. However, what I am looking for is how to do this if a single row is selected in the flexgrid and then double-clicked.

How do I determine what row was clicked so I know what info to display? And where does the code for this go?

santulan
November 30th, 1999, 09:28 PM
Hi,
If you give a look to my earlier response again you will find that
msflexgrid1.row gives you the current row number where you have clicked or selected.
The entire code goes on double click event of msflexgrid1 object which is placed on formA.

Just give a try.

Santulan

December 2nd, 1999, 07:12 AM
Your code was EXCELLENT!!!! Worked like a charm. Please accept my sincere gratitude.