Datagridview not binding or not working
i used the add a new data source wizard, were you click on your access file add what tables you want and all is good. then i created 5 different forms some with buttons with a different datagridviews of the tables on each, nothing fancy just a drag a drop and let visual studio 2005 do all the work. for some reason after the 4 form created all it does now is drops a datagridview with no data. i tried previously created ones and they all do the same thing no data in the datagridview. basically what should have happen is it normally creates a bindingnavigator were you get the buttons to cycle though the data, i get a dataset, a binding set, table adapter and a datagridview. i still get all that but the datagridview is blank. i even tried the same datasouce with a drag and dop on a form on another project and it worked fine. not sure if anyone can help any direction is appreciated.
thanks
Re: Datagridview not binding or not working
You'll need to show some code.
Re: Datagridview not binding or not working
the code is self generated all i can show is
Code:
Public Class ChamberLog
Private Sub ChamberLog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'EventTrackerDataSet.Racktime' table. You can move, or remove it, as needed.
Me.RacktimeTableAdapter.Fill(Me.EventTrackerDataSet.Racktime)
End Sub
Private Sub RacktimeBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RacktimeBindingNavigatorSaveItem.Click
<a href="http://s444.photobucket.com/albums/qq169/underdoggy/?action=view¤t=DataGridView1.jpg" target="_blank"><img src="http://i444.photobucket.com/albums/qq169/underdoggy/DataGridView1.jpg" border="0" alt="image"></a>
Me.Validate()
Me.RacktimeBindingSource.EndEdit()
Me.RacktimeTableAdapter.Update(Me.EventTrackerDataSet.Racktime)
End Sub
End Class
this is how it looks
http://i444.photobucket.com/albums/q...aGridView1.jpg
this is how it should look
http://i444.photobucket.com/albums/q...aGridView2.jpg
thanks
sorry for the big pictures
Re: Datagridview not binding or not working
Don't use wizards... Learn how to do it manually so that besides having total control on your code, you can understand what's going on.
Most experience coders here do not use wizards (me included)m and since we don't use wizards, we are not familiar with them so we can't really help you much.
Re: Datagridview not binding or not working
ok thanks ill do some searching on binding to datagrids.. oh well no worries
Re: Datagridview not binding or not working
I'd agree with Stanav re wizards. They're helpful while you're getting started but if you rely on them you never learn what's happening under the lid. You'll end up a better coder if you try to do things manually from time to time.
anyway, what do the datasource and datamember properties on the grid show. It sound like they just haven't ben set. Also, look at the columns collection property of the grid. Are you're columns in there?
Re: Datagridview not binding or not working
its weird normally the wizard would create it all for you, so it should be there and when you add it manually it doesnt bring in the values from the table for you.