Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > SetDataBinding is not a member of System.forms.Windows.DataGridView
 

SetDataBinding is not a member of System.forms.Windows.DataGridView

hello all,please help me solve this error...
(im using Vb.Net,Sql Server 2005 within Vb.net)
when i try to show my table content using datagrid,and also using dataset technique to store the changes temporary before user does the real changes to database..
then i got error that says SetDataBinding is not a member of System.forms.Windows.DataGridView
here is my code :

Private Sub FrmDbStaff_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
connetionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Crocketzzz\Documents\Visual Studio 2005\Projects\XXI Cineplex system\XXI Cineplex system\Interface\Database\XXI_Database.mdf;Integrated Security=True;User Instance=True"
'cnn = New SqlConnection(connetionString)

Dim data_adapter As SqlDataAdapter

' Create the SqlDataAdapter.
data_adapter = New SqlDataAdapter("SELECT * FROM [User]", connetionString)


' Map Table to [User].
data_adapter.TableMappings.Add("Table", "[User]")

' Fill the DataSet.
m_DataSet = New DataSet()
data_adapter.Fill(m_DataSet)

' Bind the DataGrid control to the Contacts DataTable.
dguser.SetDataBinding(m_DataSet, "[User]")

my regards
B.Bayasut  Sunday, September 06, 2009 7:50 AM
It isn't. Use the MSDN Library topic for the DataGridView class. Note the "How to bind data to the DataGridView class" link.

Hans Passant.
  • Marked As Answer byB.Bayasut Monday, September 07, 2009 6:01 PM
  •  
nobugz  Sunday, September 06, 2009 8:57 AM
It isn't. Use the MSDN Library topic for the DataGridView class. Note the "How to bind data to the DataGridView class" link.

Hans Passant.
  • Marked As Answer byB.Bayasut Monday, September 07, 2009 6:01 PM
  •  
nobugz  Sunday, September 06, 2009 8:57 AM
thx...for mR No bugs..i have solved this problem..by using ordinary technique
B.Bayasut  Sunday, September 06, 2009 11:25 AM

You can use google to search for other answers

Custom Search

More Threads

• Weird low performance Datagridview
• Problem with connection string
• Data base connection 3rd post is this Difficult?
• Image inside DataGridViewComboBoxCell
• DataGridView, checkbox and table.select()
• file Access control in LAN with specific rights
• newbie: binded data for date and change the datetime format
• Data Adapter and Databinding navigator
• bindingSource.EndEdit problem
• dgv issue.