How do I bind a datasource to the statusbarpanel.text object, there isn't a
databing property
Ken Tucker [MVP] - 09 Jun 2005 00:14 GMT
Hi,
Dim ds As New DataSet
Dim conn As SqlConnection
Dim strConn As String
Dim strSQL As String
Dim da As SqlDataAdapter
strConn = "Server = (local);"
strConn &= "Database = NorthWind;"
strConn &= "Integrated Security = SSPI;"
conn = New SqlConnection(strConn)
da = New SqlDataAdapter("Select * From Products", conn)
da.Fill(ds, "Products")
DataGrid1.DataSource = ds.Tables("Products")
StatusBar1.DataBindings.Add("text", ds.Tables("Products"), "ProductName")
Ken
-------------------------------
How do I bind a datasource to the statusbarpanel.text object, there isn't a
databing property
Razvan Constantin - 16 Jun 2005 12:18 GMT
On the form or control containing the statusbarpanel create a property:
public string StatusPanelText
{
get
{
return statusBarPanel.Text;
}
set
{
statusBarPanel.Text = value;
}
}
and then bind to the new created property.
> How do I bind a datasource to the statusbarpanel.text object, there isn't
> a
> databing property