hi!

I've been trying to debug this problem by myself but I'm running out of time figuring it out... what I'm trying to do is I want to bind the textboxes to different fields in my table...sounds simple right? Well, I thought so too. Take a look at my code...

VB Code:
  1. Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
  2.          Try
  3.             ds.Clear()
  4.             daDoc.Fill(ds, "QuoteDoc")
  5.             daTran.Fill(ds, "QuoteTran")
  6.             ds.Relations.Add("DocTran", ds.Tables!QuoteDoc.Columns!Reference, ds.Tables!QuoteTran.Columns!Reference)
  7.  
  8.             txtRef.DataBindings.Add("Text", ds.Tables!QuoteDoc, "Reference")
  9.             dtpQuote.DataBindings.Add("Text", ds.Tables!QuoteDoc, "QuoteDate")
  10.             cmbTerms.DataBindings.Add("Text", ds.Tables!QuoteDoc, "TermsID")
  11.             txtCustomer.DataBindings.Add("Text", ds.Tables!QuoteDoc, "CustomerID")
  12.             txtdiscount.DataBindings.Add("Text", ds, "QuoteDoc.Discount")
  13.             txtdiscount.DataBindings.Add("Text", ds.Tables!QuoteDoc, "Discount") \\when I inserted this code, I get an error
  14.             txtspldiscount.DataBindings.Add("Text", ds.Tables!QuoteDoc, "SplDiscount") \\This line also produced the error
  15.             txtgrand.DataBindings.Add("Text", ds.Tables!QuoteDoc, "QuoteTotal")
  16.             DataGrid1.DataSource = ds.Tables!QuoteDoc
  17.             DataGrid1.DataMember = "DocTran"
  18.             cm = CType(Me.BindingContext(ds.Tables!QuoteDoc), CurrencyManager)
  19.         Catch ex As Exception
  20.             MsgBox(ex.Message, MsgBoxStyle.OKOnly, "Error")
  21.         End Try
  22.         btnFirst.Enabled = True
  23.         btnnext.Enabled = True
  24.         btnprevious.Enabled = True
  25.         btnnext.Enabled = True
  26.         btnlast.Enabled = True

I'm completely confused why I can't bind the two textboxes. Please help! Whenever I click on the Find button this is the error I get...

"Data cannot be read from a Datagrid which is not bound to a DataTable."