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

Thread: DB Grid Display

  1. #1
    Guest

    DB Grid Display

    I am needing to take information from a dbGrid control, and display it in a label. I don't know how to take information from the grid other than from the default text property, which only returns the first column. How do I pull subsequent columns from a dbGrid?

    Any help would be GREATLY appreciated! Thanks!


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

    Re: DB Grid Display

    In code do the following
    dim something as string ' declare a string variable
    dbgrid1.col = 2 ' select other columns as required.
    dbgrid1.row = 2 ' select other rows as required.

    something = dbgrid1.text ' this will return the value in column 2 row 2 of the dbgrid.


    good luck

    bob




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