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

    Any body here to help me!

    How do we extract the data in the selected rows in a data grid? User selects multiple rows, and we need to extract the data in the selected rows. How to do this.






  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Any body here to help me!

    you might have to loop through each record and see if it's selected. The grid might have a selected items collection. i don't use it very often so i'm not sure about either of these methods. but they seem to work for other controls.

    hope this helps,

    John

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Guest

    Re: Any body here to help me!

    But Mr.John Pirkey, I've tried this method using the Bookmarks and SelBookMarks methods. What is happening here is the data grid returning the selected records out of the visible records with in the scroll bar range and it is throwing error for those selected rows which are out side the scroll bar range(please catch my point). What to do?. Could you please suggest, if possible code also.

    Regards
    Rajendra


  4. #4
    Join Date
    May 2000
    Location
    Western Australia
    Posts
    17

    Re: Any body here to help me!

    In general (i have only used msflexgrid) you can use as below:

    dim seldata as string
    seldata = msflexgrid1.clip

    'the variable seldata now holds all data in the selected area.


    good luck
    bob



  5. #5
    Guest

    Re: Any body here to help me!

    Thank you mr. Bob. I'll try this.

    Regards,
    Rajendra


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