|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Transpose datagrid row to corresponding label textI have a datagrid containing data from an xml file. Is it possible that when
a row on the datagrid is clicked these results can update a series of corresponding labels elsewhere on the form? e.g. the datagrid contains the columns, FirstName and LastName. When a row is highlighted I'd like the selected FirstName and LastName to appear in labels at the top of the form. Hi,
If you bind the datagrid and the labels to the same data source the currency manger will keep them in sync. Here is an example. Dim strConn As String Dim strSQL As String Dim da As OleDbDataAdapter Dim ds As New DataSet Dim conn As OleDbConnection strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" strConn &= "Data Source = Northwind.mdb;" conn = New OleDbConnection(strConn) da = New OleDbDataAdapter("Select * From Categories", conn) da.Fill(ds, "Categories") daEmployees = New OleDbDataAdapter("Select * From Employees Order by LastName, FirstName", conn) daEmployees.Fill(ds, "Employees") DataGrid1.DataSource = ds.Tables("Categories") TextBox1.DataBindings.Add("Text", ds.Tables("Categories"), "Description") Ken ----------------- "lukegregory" <lukegreg***@discussions.microsoft.com> wrote in message I have a datagrid containing data from an xml file. Is it possible that whennews:562B3761-AD86-4600-B4DC-97319295E6FB@microsoft.com... a row on the datagrid is clicked these results can update a series of corresponding labels elsewhere on the form? e.g. the datagrid contains the columns, FirstName and LastName. When a row is highlighted I'd like the selected FirstName and LastName to appear in labels at the top of the form.
VB.NET VERY Slow
Make installer make app start up on login SQL connection Option Strict ON and Dictionary obect two console apps. detect clicked column in datagrid Why "Application has generated an exception" error and not a good error message? Forms.captionbutton How to check for scroll bars in web browser object? CreationTime and Windows File CreationTime why different? |
|||||||||||||||||||||||