Results 1 to 4 of 4

Thread: Data Source Problem Datagrid isnt showing data

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    17

    Data Source Problem Datagrid isnt showing data

    Normally when i want to add a table to my form i use the config wizard click on my datasource add table, click and drag the new table from my data source panel and a populated datagridview appears with the toolbox for adding deleting and saving.

    My program has about 8 tables, on various forms with various names, equipmentlist, username, eventlog and so on. I made a new table called Parts in access and went through the config wizard to add it all went as usual. Now the wierd part with the new table that i add it will create everything as usaual with the drap and drop except the datagridview doesnt show any data even when you push play. So I made a new program to see if my table has a problem and it created fine. It doesnt matter what new table i add to my exsiting program it wont populate the datagridview. Is this a known bug, i cant seem to find any data on it.

    any help appreciated
    thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Data Source Problem Datagrid isnt showing data

    First up, a DataGridView is not a DataGrid, so please use the correct names to avoid confusion. The two controls are similar but have many differences.

    As to the question, is the TableAdapter's Fill method being called? That's what retrieves the data so if it's not called then no data will be retrieved. If it is called, what does it return? If it returns 0 then the query returned no records, so you need to conform the SQL code in the query. If it's non-zero then data was retrieved and it must be something wrong with your data-binding.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    17

    Re: Data Source Problem Datagrid isnt showing data

    sorry for the confusion... basically being a total noob at visual studio 2005 i dont really know to much about how its being retrieved. i thought the code was self generating as soon as i link to the table through config wizard i could drag it into the form and it would automatically create the datagridview. i checked the tableadapter, its fine it matches other tableadapters, i checked the designers everything seems to be there.

    whats wierd i thought id try one more time and it works now for no apparent reason, i didnt change anything. i guess its resolved.

    thanks jmcilhinney for looking in to the problem.

    take care

  4. #4
    Fanatic Member onlyGirl's Avatar
    Join Date
    Sep 2006
    Location
    Houston, TX
    Posts
    743

    Re: Data Source Problem Datagrid isnt showing data

    Please mark the thread resolved if you no longer need help.
    Using Visual Studio 2008

    Please mark your thread RESOLVED if you no longer need help.

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