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

Thread: Datagrid

  1. #1
    Join Date
    Apr 2001
    Posts
    36

    Datagrid

    Hello,
    I've a little prob... I have created a Datagrid but I can't link it with a Database ( from access )
    Thanx!
    zenobe03


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Datagrid

    Go to the properties of the databound grid and enter the name of the data control (which is bound to database)

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Apr 2001
    Posts
    36

    Re: Datagrid

    Thanx, but I don't really understand... I have to link a datacontrol with my database, But I don't even can do that. In the properties it's written:
    DataMember: Empty
    DataSource: < Not bound to a DataSource >
    THANX
    zenobe03



  4. #4
    Join Date
    Jul 2000
    Location
    Baton Rouge, Louisiana, USA
    Posts
    51

    Re: Datagrid

    You need a data connection first. An easy way to get connected is use ADODC. In your project, select the "project" pull-down menu, select "references". Place a check by the Microsoft ADO Data Control. Now when you close that, you'll have the ADODC control in your tool bar. Place an ADODC control on your form, and edit the properties (right click on the control to select "properties") accordingly to connect to your database. Now, select your datagrid. In the properties box, select the datasource. Adodc1 should be there to select. Does that make it any clearer?

    Patrick


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