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
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.
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
Re: Data Source Problem Datagrid isnt showing data
Please mark the thread resolved if you no longer need help.