all groups > dotnet windows forms databinding > june 2005 >
You're in the

dotnet windows forms databinding

group:

Binding to StatusBarPanel.Text


Binding to StatusBarPanel.Text Orson Cart
6/7/2005 1:51:02 PM
dotnet windows forms databinding: How do I bind a datasource to the statusbarpanel.text object, there isn't a
Re: Binding to StatusBarPanel.Text Ken Tucker [MVP]
6/8/2005 7:14:59 PM
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

-------------------------------

[quoted text, click to view]
How do I bind a datasource to the statusbarpanel.text object, there isn't a
databing property

Re: Binding to StatusBarPanel.Text Razvan Constantin
6/16/2005 12:00:00 AM
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.

[quoted text, click to view]

AddThis Social Bookmark Button