CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: FlexGrid

  1. #1
    Guest

    FlexGrid

    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.


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: FlexGrid

    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

  3. #3
    Guest

    Re: FlexGrid

    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?


  4. #4
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: FlexGrid

    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

  5. #5
    Guest

    Re: FlexGrid

    Your code was EXCELLENT!!!! Worked like a charm. Please accept my sincere gratitude.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured