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

    data grid control

    How do i use a data grid control. How can i enter things into the colums and rows. If i have a text file that is formated like this "CA","california" and then under that another statecode and state and so on for 57 different items, how can i put all these into a data grid with 2 colums????
    PLEASE HELP


  2. #2
    Join Date
    Nov 1999
    Location
    Maryland - USA
    Posts
    11

    Re: data grid control

    First, you need to make a reference to:
    Microsoft ActiveX Data Object Library 2.0 ( go to Project in your menu and select reference then scroll down and check it) and
    Then you need to go to Project in menu again, this time select component, then check
    Microsoft DataGrid control control 6.0

    If you've done with this, you need to first create a connection to your database
    when you have this connection then in your form load event you write the select statement selecting only those two columns from your database.

    then in your click event, you write:

    Set DataGridName . Datasource = recordset

    then it should work, let me know! Heru


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