G
Guest
I am sure this is probably something very simple but I am new to VB .Net and
haven't figured it out up to this point and am tired of trying.
Could I get some example source code that sets the datasource of a textbox
within the code. The datasource of the textbox varies depending on what the
user is trying to do at the time, so I am not setting the datasource from
within the designer. I want to pass the value of a field from a dataset to a
form textbox. I can successfully do this if I am passing the value from a
datagrid as shown in the code below, but I can not seem to get the right
syntax to pass the value directly from the dataset bypassing the need for the
datagrid.
dataGridTable = CType(dgdCurcuitJoin1.DataSource, DataTable)
currRow = dataGridTable.Rows(dgdCurcuitJoin1.CurrentRowIndex)
f1.txtCustomerName.Text = currRow(55, DataRowVersion.Current)
Thanks!
haven't figured it out up to this point and am tired of trying.
Could I get some example source code that sets the datasource of a textbox
within the code. The datasource of the textbox varies depending on what the
user is trying to do at the time, so I am not setting the datasource from
within the designer. I want to pass the value of a field from a dataset to a
form textbox. I can successfully do this if I am passing the value from a
datagrid as shown in the code below, but I can not seem to get the right
syntax to pass the value directly from the dataset bypassing the need for the
datagrid.
dataGridTable = CType(dgdCurcuitJoin1.DataSource, DataTable)
currRow = dataGridTable.Rows(dgdCurcuitJoin1.CurrentRowIndex)
f1.txtCustomerName.Text = currRow(55, DataRowVersion.Current)
Thanks!