Thanks, Benoit, for your explanation. Now that I've deleted the
DataBrowserCountry control & created it again inside the
DataSourceCountry control, I now see the countries (i.e. France & Great
Britain) in the DataBrowserCountry control.

However, when I try to add a new country (e.g. Fz), it moves the cursor
to a blank line following Great Britain and I key in Fz. When I click
the save button (in the DataBrowserCountry control), it comes up with a
dialog box saying 'Connection not opened' with OK button only (and
clicking OK does not result in saving). This also happens if I try to
change a country's name & save it. The DataBrowserCountry control has
Editable set to true as shown in the code fragment from the FMain class
which calls the FCountryMaintenance form:
Public Sub ButtonCountryMaintenance_Click()
  Dim hForm As FCountryMaintenance
  hForm = New FCountryMaintenance
  hForm.DataSourceCountry.Connection = MDatabase.DatabaseConnection
  hForm.DataSourceCountry.Table = "country"
  hForm.DataSourceCountry.Update()
  hForm.Refresh()
  hForm.DataBrowserCountry.Columns = ["country"]
  hForm.DataBrowserCountry.Editable = True
  hForm.DataBrowserCountry.Update()
  hForm.DataBrowserCountry.Refresh()
  hForm.Show() 
  hForm.DataBrowserCountry.SetFocus()
  Me.Hide()
End

PS I do not see a property named Labels for either control class in the
documentation. When I run my app, I see 'country', i.e. the country
table's column name, as the column label.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to